Memory error when working in Docker #849
-
Hi! I'm generating an xlsx report, via the URL: http://localhost:8080/birt-viewer/run?__format=xlsx&__report=test.rptdesign&sample=my+parameter Everything is fine, I can run the report and get the result. This container is used as a report execution service. It receives requests from RabbitMQ queue for execution and has to generate and return a result file. Everything works fine until an error occurs: java.lang.OutOfMemoryError: Java heap space. The bottom line is that the memory is not being freed after the report runs. And when ordering various large reports, the memory will run out. I've tried increasing the size of available memory through the -Xmx8g -Xms4g -XX:MaxPermSize=1024m parmeters, but this only increases the uptime, and doesn't solve the problem in any way. I still get an OutOfMemoryError and my Tomcat server stops responding until I restart the container. Can you please tell me how I can get Birt to clear the memory after the report is generated? Sorry for my English :) Birt 4.8 My Dockerfile: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Are you sure that the memory isn't freed? |
Beta Was this translation helpful? Give feedback.
-
@grigoryaleksanyan : Can you test this with a recent 4.9 build? If the problem is reproducible in 4.9 I can take a look at it. Another alternative is that you provide a HeapDump file after the error has happend. This could be done by adding: |
Beta Was this translation helpful? Give feedback.
Just to be sure: How do you check the amount of memory used?
Note that Java will normally not give back memory to the OS even if it is no longer needed after a GC.
The JVM args -XX:MaxHeapFreeRatio and -XX:MinHeapFreeRatio can help.
But your message looks like it is indeed a problem of not enough heap memory in the JVM.
I'm not using the viewer app (instead I'm using a self-made "BIRT server app"), but I can hardly imagine this is a BIRT problem.
Maybe it is the data that you supply to BIRT which is not freed?
Or the data is cached (well, BIRT uses caching AFAIK, but I'm not enough of an expert here)?