nicknxswart.nl Posted October 20, 2019 Share Posted October 20, 2019 Hello people!Unfortnaly I have a problem with my JasperServer, but maybe you could be the one to help me out!Every month there is one process that generates around 400 documents.Last night this process again run and the JasperServer got a error:Java HotSpot 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000d61b0000, 485883904, 0) failed; error='Cannot allocate memory' (errno=12)## There is insufficient memory for the Java Runtime Environment to continue.# Native memory allocation (mmap) failed to map 485883904 bytes for committing reserved memory.[/code]The JasperServer 7 is running on a Ubuntu 19.04 Vultr machine with 2048 MB of RAM.Based on the JasperServer specs I would asume it's better to increase the amount of RAM and probably the allocate memory error will then also be fixed.But I want to try to get this problem fixed without adding more ram to the server.Would anyone have some tips for me on how to doing that?Kind regards, Link to comment Share on other sites More sharing options...
djohnson53 Posted October 20, 2019 Share Posted October 20, 2019 What version are you running? But I doubt you'll get a better answer than to add memory. Link to comment Share on other sites More sharing options...
nicknxswart.nl Posted October 21, 2019 Author Share Posted October 21, 2019 We have jasper 7 running, is there not a way to limit the amount of memory that Java can use so this error wil not happen anymore? Link to comment Share on other sites More sharing options...
djohnson53 Posted October 21, 2019 Share Posted October 21, 2019 That's what you're doing now - limiting the memory available. That's why you're getting the error. Link to comment Share on other sites More sharing options...
nicknxswart.nl Posted October 22, 2019 Author Share Posted October 22, 2019 Is there a way to fix this so we can stay on this amount of memory? Increasing it makes it more expensive and for only a few reports that does not make a lot of sense. Link to comment Share on other sites More sharing options...
danoldenkampgmail.com Posted October 22, 2019 Share Posted October 22, 2019 Looks like that one job to run 400 documents needs 485MB free to run. I see you run 2048MB, but how much is free?Is that Ubuntu Vlutr running core minimalist without a GUI?If not you could try disabling services but 2GB is pretty tight. That's pretty out of the scope of this forum.If you really wanted to pinch pennies, just split your report up. Instead of one huge document run split it up into a number of smaller automated document runs.(Change the criteria of your report by some factor to make it into something smaller to manage.) Link to comment Share on other sites More sharing options...
C-Box Posted October 23, 2019 Share Posted October 23, 2019 There is also a Virtualizer for running large reports. We used this for generating large stock or calculation based reports within our ERP-System some years ago where some Reports runs took even several hours and not to run into the OutOfMemory we used the (GZip)Virturalizer logic - Worked fine when I remember right. ;-)http://jasperreports.sourceforge.net/sample.reference/virtualizer/index.htmlhth + regardsC-Box Link to comment Share on other sites More sharing options...
nicknxswart.nl Posted October 23, 2019 Author Share Posted October 23, 2019 Our system does 400 calls to the jasperserver to generate the reports so in this case I asume 400 jobs. We now tried to limit the java memory by export JAVA_OPTS="-Xms1536m -Xmx1536m -XX:PermSize=32m"[/code]But I'm not sure if this will work? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now