Обсуждение: "too many clients" and no cure
Hi, I experience some trouble with my PG server. I get the error message "too many clients". Ok, so I checked the manual and adjusted the max_connections and shared_buffers, but still the server denies access, if there are about 100 connections. I just recently increased the shared buffers from 10000 to 50000 and the system shared memory fom 128m to about 800m. Still the error occurs at 100 active connections. Here's some system info: OS is SuSE Linux 9.1 (kernel 2.6.7-040722) I have 1GB of RAM. PG is 7.4.2 Parameters in postgresql.conf: max_connections = 500 shared_buffers = 50000 sort_mem = 2048 sysctl -a | grep shm kernel.shmmni = 134217728 kernel.shmall = 805306368 kernel.shmmax = 805306368 ipcs -ls ------ Semaphore Limits -------- max number of arrays = 128 max semaphores per array = 250 max semaphores system wide = 32000 max ops per semop call = 100 semaphore max value = 32767 Thanks, Tom
postgresql@thomasbache.de writes: > I experience some trouble with my PG server. I get the error message > "too many clients". Ok, so I checked the manual and adjusted the > max_connections and shared_buffers, but still the server denies > access, if there are about 100 connections. I just recently increased > the shared buffers from 10000 to 50000 and the system shared memory > fom 128m to about 800m. Still the error occurs at 100 active > connections. It sounds like you forgot to restart the postmaster after changing postgresql.conf. This is one of the parameters that is frozen at server start ... regards, tom lane
> It sounds like you forgot to restart the postmaster after changing > postgresql.conf. This is one of the parameters that is frozen at server > start ... No, I did restart the postmaster. Actually more than once. I do not have to restart the server after changing kernel parameters with sysctl, do I? Do you have any other ideas? I'm having trouble since a week or so ...
postgresql@thomasbache.de writes: >> It sounds like you forgot to restart the postmaster after changing >> postgresql.conf. This is one of the parameters that is frozen at >> server start ... > No, I did restart the postmaster. Actually more than once. In that case, maybe you edited the wrong copy of postgresql.conf? Try checking "SHOW max_connections" to verify what the postmaster thinks the value is. > I do not have to restart the server after changing kernel parameters > with sysctl, do I? I don't think kernel limits would lead to "too many clients" --- you'd be getting different sorts of failures if the problem were in that area. regards, tom lane
> In that case, maybe you edited the wrong copy of postgresql.conf? > Try checking "SHOW max_connections" to verify what the postmaster > thinks the value is. Hmm, it said it still had 100. Even though the postgresql.conf stayed unchanged, after yet another restart it works. Funny. > I don't think kernel limits would lead to "too many clients" --- you'd > be getting different sorts of failures if the problem were in that area. Thanks a lot ! Tom