Jasper Server Hangs when running many reports at a same time


I use Jaspersoft 5.6.1 Community Edition for reporting on jboss eap 6 . I recently encountered a problem that my report server hangs when running many reports at a time. Server shows me as Loading but it never get finished. I have to manually restart the server and continue.. It seems there is a problem with the database connection pool which it does not get released after invoking a report. 

Here are my connection pool configuration

In jasperserver.war\WEB-INF\applicationContext.xml


<bean id="dataSourceObjectPoolFactory" class="org.apache.commons.pool.impl.GenericObjectPoolFactory">
  <constructor-arg type="org.apache.commons.pool.PoolableObjectFactory">
  <constructor-arg type="int" value="20" />

In jasperserver.war\META-INF\context.xml

<Resource name="jdbc/jasperserver"
          maxActive="100" maxIdle="30" maxWait="10000"
          factory="${tomcatBasicDatasourceFactory}" />

and also I noticed that my jvm heap usage goes to 100 % when the report server hangs. Is there any solution regarding this?

dlcathukorala's picture
Joined: May 19 2015 - 10:52pm
Last seen: 6 years 2 weeks ago

@hozawa Thank you for your immediate answer. But that was not the issue. I recently found the reason for this hanging. It is because of a bean datasource which I use to switch between schemas of my database. I created a new Question please refer to it if you can. 


Thank you.

dlcathukorala - 8 years 2 months ago

1 Answer:

This often happens when you're low on memory. Try allocating more memory to your application server jvm.

The better solution, however, is to schedule your report generation instead of generating them on the fly. I recommend creating a front end portal which generates reports using JasperReports Server APIs in the background via async.

hozawa's picture
Joined: Apr 24 2010 - 4:31pm
Last seen: 4 years 3 months ago