# Large reports timeout

**URL:** <https://forum.servoy.com/t/large-reports-timeout/10042>\
**Category:** Classic Servoy\
**Created:** [December 18, 2008, 8:39pm UTC](https://forum.servoy.com/t/large-reports-timeout/10042 "2008-12-18T20:39:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![popdizzle](https://avatars.discourse-cdn.com/v4/letter/p/5e9695/32.png) [@popdizzle](https://forum.servoy.com/u/popdizzle)\
**Post date:** [December 18, 2008, 8:39pm UTC](https://forum.servoy.com/t/large-reports-timeout/10042/1 "2008-12-18T20:39:35Z")

</div>

I have a report that can be as long as 500 pages. When it goes into Preview mode for printing, it chugs away, then I get a “Could not retrieve all data needed for printpreview” error.

I get the following error in the servoy server log:

> java.util.NoSuchElementException: Timeout waiting for idle object  
> at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:801)  
> at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:110)  
> at com.servoy.j2db.persistence.datasource.i.getConnection(Unknown Source)  
> at com.servoy.j2db.persistence.Server.getUnmanagedConnection(Unknown Source)  
> at com.servoy.j2db.dataprocessing.SQLEngine$UpdatePerformer.run(Unknown Source)  
> at com.servoy.j2db.util.as.run(Unknown Source)  
> at java.lang.Thread.run(Unknown Source)

and

> java.util.NoSuchElementException: Timeout waiting for idle object  
> at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:801)  
> at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:110)  
> at com.servoy.j2db.persistence.datasource.i.getConnection(Unknown Source)  
> at com.servoy.j2db.persistence.Server.getConnection(Unknown Source)  
> at com.servoy.j2db.dataprocessing.SQLEngine.a(Unknown Source)  
> at com.servoy.j2db.dataprocessing.SQLEngine.performQuery(Unknown Source)  
> at sun.reflect.GeneratedMethodAccessor220.invoke(Unknown Source)  
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)  
> at java.lang.reflect.Method.invoke(Unknown Source)  
> at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)  
> at sun.rmi.transport.Transport$1.run(Unknown Source)  
> at java.security.AccessController.doPrivileged(Native Method)  
> at sun.rmi.transport.Transport.serviceCall(Unknown Source)  
> at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)  
> at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)  
> at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)  
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)  
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)  
> at java.lang.Thread.run(Unknown Source)

I upped my active connections on all dbservers to 25, but still no luck. I have resorted to printing 100 records at a time, so the user has to keep hitting the Print button as each group of 100 prints. I tried doing controller.print() instead of printpreview() but same result.

What else might I optimize to correct this situation? What are the reasonable limits for printing large reports, in terms of pages?

I’ve tried loadRecords(query) and loadRecords(dataset), but same result.

Mysql 5.0  
Windows 2003 Server  
Windows XP for Smart Client  
2gb RAM on client machine  
Servoy 3.5.7

---

<div class="post-metadata">

**Author:** ![ngervasi](https://avatars.discourse-cdn.com/v4/letter/n/f9ae1b/32.png) [@ngervasi](https://forum.servoy.com/u/ngervasi)\
**Post date:** [December 19, 2008, 12:59pm UTC](https://forum.servoy.com/t/large-reports-timeout/10042/2 "2008-12-19T12:59:36Z")

</div>

Increasing DB connections doesn’t help here, you should increase the client memory from the admin pages, restart servoy server, trash the client and download a new one, try setting the client heap size to 256MB, it should be enough. To monitor the client memory usage open the “About Servoy” window, keep it open while running your method to check realtime.

---

<div class="post-metadata">

**Author:** ![Thomas\_Parry](https://avatars.discourse-cdn.com/v4/letter/t/b38774/32.png) [@Thomas\_Parry](https://forum.servoy.com/u/Thomas_Parry)\
**Post date:** [December 19, 2008, 3:08pm UTC](https://forum.servoy.com/t/large-reports-timeout/10042/3 "2008-12-19T15:08:52Z")

</div>

Jason,  
really now,  
time to switch to Jasper Reports via the Servoy plugin?

---

<div class="post-metadata">

**Author:** ![popdizzle](https://avatars.discourse-cdn.com/v4/letter/p/5e9695/32.png) [@popdizzle](https://forum.servoy.com/u/popdizzle)\
**Post date:** [December 19, 2008, 3:38pm UTC](https://forum.servoy.com/t/large-reports-timeout/10042/4 "2008-12-19T15:38:08Z")

</div>

Dang, yer right Tom. That’s actually a great suggestion. I have other issues that Jasper might solve too, like poor graphics rendering.

Thanks for the V-8 slap up side the head!

---

<div class="post-metadata">

**Author:** ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)\
**Post date:** [January 7, 2009, 11:15am UTC](https://forum.servoy.com/t/large-reports-timeout/10042/5 "2009-01-07T11:15:39Z")

</div>

this really seems to be a problem of the connection pool running out of connections.  
So if you look when it happens to the admin pages is really the used connections to the max?

How many clients are using connections then? Are you also using db transactions?
