Is there some kind of database transaction leaking issue with DSpace,
particularly the XMLUI? Basically, I find that it doesn't matter what I my
pool size is. Eventually it always gets full. Sometimes it takes a few
days, sometimes it happens a few times in one day. Today I saw this in
dspace.log.2018-02-07:

org.apache.tomcat.jdbc.pool.PoolExhaustedException:
[http-bio-127.0.0.1-8443-exec-328] Timeout: Pool empty. Unable to fetch a
connection in 5 seconds, none available[size:250; busy:250; idle:0;
lastwait:5000].

The pool size is 250, and yet PostgreSQL activity shows literally all of
the 250 connections as either idle or idle in transaction:

$ psql -c 'select * from pg_stat_activity' | grep -c "PostgreSQL JDBC"
250
$ psql -c 'select * from pg_stat_activity' | grep "PostgreSQL JDBC" | grep
-c idle
250
$ psql -c 'select * from pg_stat_activity' | grep "PostgreSQL JDBC" | grep
-c "idle in transaction"
187

What is going on? I'm going crazy restarting the server and staring at log
files trying to figure out what is going on. We're using DSpace 5.5 with
PostgreSQL 9.5.10 and the latest PostgreSQL JDBC driver from
jdbc.postgresql.org (42.2.1) on fast hardware with plenty of memory and
CPU. But DSpace. Always. Crashes. Every. Day. It seems DS-3551 might help,
but we can't move to DSpace 5.7 yet, and our 5.5 branch doesn't build if I
cherry-pick the commits for DS-3551[0].

[0] https://jira.duraspace.org/browse/DS-3551

Let's get to the bottom of this,

On Thu, Feb 1, 2018 at 3:43 PM Mark H. Wood <mwoodiu...@gmail.com> wrote:

> If you have stuck connections, you may want to try some of the pool
> provider's connection testing parameters.  I've had good results using
> 'validationQuery="SELECT 1"' with 'testOnBorrow="true"'.
>
> Also I've found that older PostgreSQL drivers seem to see this problem
> more frequently, so I try to keep Tomcat updated with the latest released
> DBMS drivers.
>
> --
> 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+unsubscr...@googlegroups.com.
> To post to this group, send email to dspace-tech@googlegroups.com.
> Visit this group at https://groups.google.com/group/dspace-tech.
> For more options, visit https://groups.google.com/d/optout.
>
-- 

Alan Orth
alan.o...@gmail.com
https://picturingjordan.com
https://englishbulgaria.net
https://mjanja.ch

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.

Reply via email to