Hi,
I’ve been having a memory issue with my application server.
I’m using Jasper Reports to make all my reports.
Only when I print a specially complex report my server crashes and reboots. The report is printed correctly but the moment any client takes action after printing the report everything crashes.
I tried updating the heap memory from 64 to 256 but it seems to have no effect at all.
This is the exception trown in servoy log.
Exception in thread "2 way Server Acceptor" java.lang.OutOfMemoryError: unable to create new native thread
Filter trigger matched. Restarting JVM.
at java.lang.Thread.start0(Native Method)
at java.lang.Thread.start(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.addIfUnderMaximumPoolSize(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.execute(Unknown Source)
at com.servoy.j2db.rmi.ServerTwoWaySocketFactory$TwoWayServerSocket.run(ServerTwoWaySocketFactory.java:607)
at java.lang.Thread.run(Unknown Source)
I’m using Servoy 6.0 with Java 1.6.0_23.
Jasper version is 3.7.1 and my server runs with Win Server 2008
It’s your servoy application server that crashes or the smart client that requested the report?
What heap size did you increase? The smart client heap size or the application server heap size?
When you say complex report do you also mean very long in terms of pages output from JasperReports?
There is a known issue with in memory reports that are very lengthy. Search forum.
The server crashes, and i increased both heaps, the client one to 256 and the server one to 1024 maybe i need more. And yes it is a potentially very long in term pages report (could be like 300-400 pages long) ill look for that known issue.
ive tryied this with both the swapFile and the file virtualizer but the server is still crashing afterwards, how can i assure myself that it is actually using the virtualizer? and if it is using it, could it be something else that makes my server crash?
yeah the log gives me the same error i posted at the begging of the post and from iReport it runs just fine, i also get to see the report from servoy but after that when something else is done on the client or when another client connects it crashes
IF you run the report in the developer/debugger and stop it after the report has completed has it crashed then?
Perhaps you could wrap the plugins.jasperPluginRMI.runReport in a try catch block to determine if there is an exception raised then or if it is a little later in your processing.
Also: have you tried using the latest released plugin version ?
i put a breakpoint after the report and it didnt crashed by that time, also i didnt get any exception from try catch and im using the 3.1 b2 version of the plugin.
I realized that the virtualizer is working cause the virtualizer files appeared in the tmp folder, but its still crashing when another client connects or when something else is done. i believe that this problem is just appearing on the server side, cause on developer i havent been able to reproduce the crash.
ive searched ```
java.lang.OutOfMemoryError: unable to create new native thread
ive changed on the wrapper.config this
Maximum Java Heap Size (in MB)
wrapper.java.maxmemory=128
and also in the administrator page the client heap size, but nothing seems to work, im kinda lost and confused here <img src="{SMILIES_PATH}/icon_confused.gif" alt=":?" title="Confused" />
ive just solved it!it seems that the server heap was never increased because i didnt reboot the server after modifying the wrapper, i had restarted app server but seems it was not enough.
Now its working fine but im still worried that it might break with some long report and several clients active, anyway i can keep on going now, thanks for the help