当Birt ReportTemplate 设计缺陷或者由于数据量巨大,有可能导致内存溢出问题。
可以通过调整Birt Engine 的相关参数避免问题的产生,可以调整一下参数。 Buffer 的单位均为MB
ID
|
API
|
Description For API
|
Value To Be Set
|
---|---|---|---|
1 | DataEngine.MEMORY_BUFFER_SIZE | Indicate the size of data cached for each result set. We only accept non-negative integer as input, in memory during query processing. | 100 |
2 | DataEngine.IN_MEMORY_CUBE_SIZE | The size of cube to be saved in memory rather than in disk. The unit is MB. In case that the size the disk will automatically be used. | 100 |
3 | DataEngine.MEMORY_USAGE | Indicates data engine memory usage hint level
| DataEngine.MEMORY_USAGE_NORMAL |
这样通过限制内存中的buffer 从而限制内存的使用,当内存不足时,将使用Disk作为Cache,可能造成性能稍微的下降,但可以避免内存溢出问题。
当内存空闲较大时,可以适当的放大 buffer 值。