Armenian Knowledge Base  

Go Back   Armenian Knowledge Base > Technical sections > Webmaster Zone > Web Development
Register

Reply
 
LinkBack Thread Tools
Old 12.05.2004, 14:11   #1
Web developer
 
Aram Ghazanchyan's Avatar
 
Join Date: 09 2002
Location: Yerevan
Age: 36
Posts: 896
Downloads: 1
Uploads: 0
Reputation: 9 | 0
Default Too many connections

Warning: mysql_pconnect(): Too many connections in /home/xxx/public_html/conn.inc.php on line 2

Chto delat'?
Reply With Quote
Old 12.05.2004, 16:24   #2
Moderator
 
acid's Avatar
 
Join Date: 09 2001
Location: South Korea, Gumi
Posts: 7,699
Downloads: 102
Uploads: 34
Blog Entries: 16
Reputation: 561 | 6
Default

There are two ways out:

1. You may want to change mysql_pconnect() to mysql_connect(), because first one won't close connection when script is ended. Documentation says:

Quote:
the connection to the SQL server will not be closed when the execution of the script ends. Instead, the link will remain open for future use (mysql_close() will not close links established by mysql_pconnect()).
2. You may increase your max_connections variable in your my.cnf.

Up to you to decide which way is the best for your case.

Cheers.
Reply With Quote
Old 12.05.2004, 17:18   #3
Главный Лысый
 
Pascal's Avatar
 
Join Date: 10 2001
Location: AM
Age: 39
Posts: 2,829
Downloads: 4
Uploads: 0
Reputation: 28 | 4
Default

Perhaps it's a hoster limitation.
Review max m,ysql connections in your contract.

Regards
Reply With Quote
Old 13.05.2004, 07:50   #4
Web developer
 
Aram Ghazanchyan's Avatar
 
Join Date: 09 2002
Location: Yerevan
Age: 36
Posts: 896
Downloads: 1
Uploads: 0
Reputation: 9 | 0
Default

Thanks a lot
Reply With Quote
Sponsored Links
Reply

Thread Tools


На правах рекламы:
реклама

All times are GMT. The time now is 03:50.


Powered by vBulletin® Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.