Running Out of Database Connections

JasperReports Server manages a pool of connections for each JDBC data source. The default number of connections is 20, but if you run many reports concurrently against the same data source you may reach the connection limit and see degraded performance. In particular, using the web service APIs, REST clients can easily launch many report executions at the same time and reach the limit.

The connection pool size is limited to avoid having too much memory permanently allocated to connections. But if you need more concurrent connections on a regular basis, you can increase the limit with the following configuration:

Reducing the Size Limit for Ad Hoc Dimensions

Configuration File

.../WEB-INF/applicationContext.xml

Property

Bean

Description

<constructor-arg type="int" value="20"/>

dataSource
ObjectPool
Factory

Change the default value to match your concurrent connections. Make sure you have enough memory to handle the connections and the concurrent report executions.

If you are using JNDI data sources, you can configure the number of connections in your application server. For more information, see the sections on JNDI in Working With Data Sources.

Version: 
Feedback