[ale] CentOS & PostgreSQL help re: TIME_WAIT

Geoffrey lists at serioustechnology.com
Thu Jan 28 14:13:38 EST 2010


Reggie Euser wrote:
> Zombie PostgreSQL processes in a "TIME_WAIT" state are consuming all 
> available sockets on a web server I'm running. I've Googled & RTFM'ed but am 
> still stumped.  Sure would appreciate any ideas.

I'd jump on the postgresql general list with your inquiry.

> I've recently migrated a PHP-based web app running against PostgreSQL from a 
> single server running FreeBSD to a cluster consisting of:
> 
> -  two virtual machines, both running CentOS 5.4, Linux version 
> 2.6.18-14.10.1.el5 both with 3 Gb RAM allocated, both with two dual-core 
> Intel processors allocated.

Red Hat says you should have more then two machines in a cluster, 
because you can get into a deadlock situation with two.

> 
> -  the web server is running Apache 2.2.14 & PHP 5.31.
> 
> -  the database server is running PostgreSQL 8.4.1, with pg_hba.conf set up 
> to trust the webserver on port 5432.
> 
> -  both Apache & PostgreSQL are set to accept 225 max connections, otherwise 
> the conf's are pretty much default.
> 
> -  web server is running OpenSSL for secure login, but serving general html 
> pages without https.
> 
> -  tcp_keepalive_time in both is default 7200 seconds (which, as I read in 
> various posts, etc., shouldn't really matter anyway, but...)
> 
> Various posts suggest that this could be a PHP programming issues, but as 
> the problem just surfaced with the migration, I'm inclined to think it's 
> probably either a PostgreSQL configuration issue or something related to the 
> OS?
> 
> A cron job restarting Apache every hour is keeping the webserver alive, but 
> I'd sure like a better solution...
> 
> Any ideas would be greatly appreciated...
> 
> Thanks!
> 
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
> 


-- 
Until later, Geoffrey

"I predict future happiness for America if they can prevent
the government from wasting the labors of the people under
the pretense of taking care of them."
- Thomas Jefferson


More information about the Ale mailing list