Thread: Connection Limit
Hello, I have a server running postgres 7.4.13 and am starting to see errors "FATAL: connection limit exceeded for non-superusers". I'm not sure which one of my applications are hogging all of the connections, is there a way debug this somehow? Thanks, Jon.
I have another related question when running ps -fax i see the following <snip>7476 ? S 0:00 | \_ postgres: mobileuser mobileextension [local] idle8046 ? S 0:00 | \_ postgres: mobileuser mobileextension 127.0.0.1 idle <snip> I have a few processes that are running with host = 127.0.0.1 and then about 90% of all the processes are running as [local]. What does [local] mean, since in fact 127.0.0.1 is obviously local, how do they differ? Thanks, Jon. On 7/30/07, Jon Horsman <horshaq@gmail.com> wrote: > Hello, > > I have a server running postgres 7.4.13 and am starting to see errors > "FATAL: connection limit exceeded for non-superusers". > > I'm not sure which one of my applications are hogging all of the > connections, is there a way debug this somehow? > > Thanks, > > Jon. >
On Mon, Jul 30, 2007 at 05:41:51PM -0400, Jon Horsman wrote: > > I have a few processes that are running with host = 127.0.0.1 and then > about 90% of all the processes are running as [local]. What does > [local] mean, since in fact 127.0.0.1 is obviously local, how do they > differ? I _believe_ [local] means UNIX domain socket. As to your other question, either ps or pg_stat_activity is your friend. A -- Andrew Sullivan | ajs@crankycanuck.ca The very definition of "news" is "something that hardly ever happens." --Bruce Schneier
On 7/30/07, Jon Horsman <horshaq@gmail.com> wrote: > Hello, > > I have a server running postgres 7.4.13 and am starting to see errors > "FATAL: connection limit exceeded for non-superusers". > > I'm not sure which one of my applications are hogging all of the > connections, is there a way debug this somehow? try netstat -an|grep 5432 assuming you're running pgsql on port 5432. The nice thing about this trick is that since postgresql uses /tmp/.s.PGSQL.5432 for local connections, you'll see those too.
Thanks for the help guys, i'll try your suggestions when i get a chance. Jon.