Seeking Assistance: Persistent JDBC Connection Leak (Idle in Transaction) on DSpace startup

35 views
Skip to first unread message

Nada Mehmoud Ahmed Ibrahim Aboueata

unread,
Nov 27, 2025, 12:35:13 PMNov 27
to DSpace Technical Support

Dear DSpace Community,

I am writing to seek assistance with a critical and persistent issue regarding database connection management immediately following application startup on my DSpace 6.3 instance.

Immediately after restarting my Tomcat service running DSpace 6.3 (using PostgreSQL and Apache Commons DBCP2/Hibernate), the database connection pool rapidly fills up with connections in the idle in transaction state. This eventually exhausts the pool, leading to application-wide errors (Timeout waiting for idle object) and general slowness. Browsing and performing functions as approving rejected or uploading files, is extremely slow, and sometimes it fails. 


Can you please assist, as this is a production env. 


Marion Rupp

unread,
Dec 1, 2025, 7:37:05 AMDec 1
to dspac...@googlegroups.com
Hi Nada,

You are not alone, we have this problem too with our DSpace 6.4 instance. Our current solution for this problem is a cronjob in Linux:
If there are more than 50 "idle in transaction" transactions, then restart PostgreSQL, Tomcat and Nginx.

This is our code:
Cronjob:
*/1 * * * * root /usr/bin/test `/usr/bin/pgrep -f 'idle in transaction' | /usr/bin/wc -l ` -gt 50 && Reset.sh

Reset.sh:
service nginx stop
service postgresql restart
service tomcat9 restart
service nginx start

Hope this works :-)

Good luck & kind regards,
Marion
--
All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
---
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/dspace-tech/CAPzkmC4LWEhn_jtLfm08TbQBXVFaSGqDeX19DCQ2fOArb_drBA%40mail.gmail.com.

-- 
Marion Rupp
Bibliotheks-IT
Universitäts- und Landesbibliothek Bonn
Postfach 2460, D-53014 Bonn
Tel. 0228 / 73 75 50 
Mobil: 01515 8391029
Fax: 0228 / 73 75 46
eMail: mario...@ulb.uni-bonn.de

Internet: https://www.ulb.uni-bonn.de
Facebook: https://facebook.com/ulbbonn
Instagram: https://www.instagram.com/ulbbonn/

Reply all
Reply to author
Forward
0 new messages