Hi all. After reloading my web app that has a Lucee + Taffy back end
approximately 100 times, I get the following error:
psql: FATAL: remaining connection slots are reserved for non-replication superuser connections
This requires me to restart the Lucee server (4.5.2.0.18 final) and then
things are fine for a while and then the process repeats!
I’ve tried various datasource settings via the administrator without any
success. I’ve tried increasing (as well as decreasing) the max connection
limit as well as setting the connection timeout to 0 vs 1 minute vs
something very long. When I decrease the max connection limit, I don’t get
the above error message but rather Lucee just times out (which makes sense
as here it is waiting to use a connection).
I’m using Postgresql 9.4 on the same server as Lucee (localhost). I am
using a combination of ORM as well as non-ORM SQL statements. I use two
data sources.
A “ps auxwww|grep postgres” shows that there are lots of idle connections
and these don’t go away, even after a long time (see below).
Anyone have any ideas what’s happening and how to troubleshoot and/or
solve?
Thanks,
Cage
postgres 8336 0.0 0.2 220396 7828 ? Ss 02:34 0:00 postgres:
username dbname 127.0.0.1(36112) idle
postgres 8337 0.0 0.3 220396 10292 ? Ss 02:34 0:00
postgres: username dbname 127.0.0.1(36113) idle
postgres 8339 0.0 0.1 219268 3484 ? Ss 02:34 0:00 postgres:
username dbname 127.0.0.1(36115) idle
postgres 8359 0.0 0.1 219268 3484 ? Ss 02:34 0:00 postgres:
username dbname 127.0.0.1(36120) idle
postgres 8364 0.0 0.1 219268 3484 ? Ss 02:34 0:00 postgres:
username dbname 127.0.0.1(36121) idle
postgres 8410 0.0 1.2 220940 38620 ? Ss 02:35 0:00 postgres:
username dbname 127.0.0.1(36125) idle
postgres 8415 0.0 0.3 220220 9736 ? Ss 02:35 0:00 postgres:
username dbname 127.0.0.1(36127) idle
postgres 8428 0.0 0.1 219264 3500 ? Ss 02:35 0:00 postgres:
username dbname 127.0.0.1(36130) idle
postgres 8446 0.2 2.0 220540 61960 ? Ss 02:36 0:04 postgres:
username dbname 127.0.0.1(36132) idle
postgres 8457 0.0 0.1 219264 3508 ? Ss 02:37 0:00 postgres:
username dbname 127.0.0.1(36136) idle
postgres 8539 0.3 2.7 220564 83256 ? Ss 02:42 0:04 postgres:
username dbname 127.0.0.1(36145) idle
postgres 8628 0.4 2.7 220200 83288 ? Ss 02:47 0:04 postgres:
username dbname 127.0.0.1(36158) idle
postgres 8664 0.5 2.7 221480 84672 ? Ss 02:49 0:04 postgres:
username dbname 127.0.0.1(36163) idle
postgres 8674 0.0 0.5 220216 17320 ? Ss 02:49 0:00 postgres:
username dbname 127.0.0.1(36165) idle
postgres 8677 0.0 0.2 220084 8756 ? Ss 02:49 0:00 postgres:
username dbname 127.0.0.1(36168) idle
postgres 8744 0.0 0.1 219264 3512 ? Ss 02:52 0:00 postgres:
username dbname 127.0.0.1(36176) idle
postgres 8750 0.6 2.0 220540 62004 ? Ss 02:52 0:03 postgres:
username dbname 127.0.0.1(36178) idle
postgres 8752 0.1 0.5 220216 18372 ? Ss 02:52 0:00 postgres:
username dbname 127.0.0.1(36179) idle
postgres 8759 0.1 1.5 221516 47096 ? Ss 02:52 0:00 postgres:
username dbname 127.0.0.1(36180) idle
postgres 8760 0.6 2.0 220156 63316 ? Ss 02:52 0:04 postgres:
username dbname 127.0.0.1(36181) idle
postgres 8785 0.0 0.1 219264 3512 ? Ss 02:53 0:00 postgres:
username dbname 127.0.0.1(36183) idle
postgres 8789 0.0 0.3 220220 10172 ? Ss 02:53 0:00 postgres:
username dbname 127.0.0.1(36185) idle