On Wed, 2005-08-17 at 13:05 -0300, eu wrote: > Hello, i need help... > > i have a postgresql 8.0.3 database running on the backend of a postfix > setup ( i didn't trust Mysql for the job ) on Linux kernel 2.6.8.1, > serving email to a dozen different virtual domains ( including this one > i'm using right now )... > > however, this setup takes a whole lot of simultaneous connections to the > database > ( postfix, amavis-new, clamav + spamassassin, apache+squirrelmail, > courier-authlib and courier-imap ), all those services were configured > to use Unix Domain Sockets, instead of TCP ( netstat -anvp showed too > many short-lived connections were kept on CLOSE_WAIT for too long while > connecting via TCP ), and, despite i have made max_connections on the > postgresql.conf as high as 500, after ( around ) 64 simultaneous > connections i start having a lot of "sorry too many clients already" > errors on my postgresql logfile... > then, my users go nuts complaining about how slow the server is and/or > having to retype their passwords too many times ( of course, since > authlib can't pick a connection to authenticate against the database ). > > max_connections, shared_buffers, shmmax were tweaked, but the server > does not seems to respect the 500 max_connections... > i *know* i'm missing something obvious, but, what could be wrong ?... > i'm lost... any help would be most appreciated... please. > Can you post the relevent portions of your postgresql.conf file? Do you see any error messsages when starting the database up (perhaps about shared memory or such)? We also run a postfix mailserver (with maildrop, courier-imap/vauthchkpw, etc) against a postgresql database with max_connections set to 512 (FreeBSD 5.x machine). On the delivery end of things we pool the connections from the postfix server using proxymap(8) (which helped ease the connections load). Sven ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq