Jump to content
Changes to the Jaspersoft community edition download ×

MongoDB connection in sub-report leaves connection open


charles_31

Recommended Posts

We have reports which pass a new mongodb() connection to the sub report to allow the master report to pull data from MySQL and the sub reports to pull data from MonogDB. When we do this the connection to MongoDB created in these sub reports gets left open, we have tried adding socketTimeout and idleTimeout to the URI of the sub report but none of these help and we end up with 1,000s of threads running each with connections to MongoDB. Eventually this crashes JasperReports with a OutOfMemory error (miss reported) as it cannot create more threads. We have some reports which do 100's or 1000's of pages and each has a sub report, so this can cause issue quickly.

This is exactly the same as the issue reported here:

https://stackoverflow.com/questions/59607590/jasper-report-mongodb-connection-wont-close

My assumption is that putting a "new" in the connection string creates the mongodb() object but nothing destroys it, not even garbage collection. Any ideas on how we can fix this?

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Thank you for posting to the Jaspersoft Community. Our team of experts has read your question and we are working to get you an answer as quickly as we can. If you have a Jaspersoft Professional Subscription plan, please visit https://support.tibco.com/s/ for direct access to our technical support teams offering guaranteed response times.
 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...