Forum Moderators: coopster

Message Too Old, No Replies

mysql_pconnect make mysql too many connections

but increasing max_connections take more memory

         

Xuefer

11:06 am on Dec 8, 2003 (gmt 0)

10+ Year Member



mysql_pconnect -> too many connections -> increase mysql max_connections -> take up more memory -> slower?!

there's many static file: html/images
and dyn file: *.php
a php page is loaded, then images is requested, and then keep-alive idle, so most of mysql thread is idling...

what can i do to optimize?

jaski

12:53 pm on Dec 8, 2003 (gmt 0)

10+ Year Member



If you need to close idle persistent connections, set a low wait_timeout in MySQL - sasha@mysql.com

Xuefer

1:43 pm on Dec 8, 2003 (gmt 0)

10+ Year Member




if you set wait_timeout, and you have high number of connection closed, you need too, set max_connect_errors (in MySQL) [mysql.com...]

does it mean every wait_timeout will count as connect_error?

and what avlue do u suggest to wait_timeout for web server?
php + many static file(images/js/css)
keep-alive timeout=15