![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Jun 2002
Location: New England
Posts: 515
|
Anyone know how to cut off too many mySQL connections?
My server is getting bombarded with too many mySQL connections, how can I cut some of them off.
![]() ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: Jan 2003
Location: Within my lucid dream world.
Posts: 250
|
modify /etc/my.cnf and reduce the value of 'max_connections'
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: Jun 2002
Location: New England
Posts: 515
|
I restarted apache and that seemed to do the trick. Thanks for your response.
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Join Date: Jan 2005
Location: Ontario, OR
Posts: 148
|
That may do it only temporary. The main cause of your problem most likely is the script youre using is bottlenecking mysql, and eventually may come back. The best thing to do if this happens again would be to reevaluate your script and work out any effeciencies. The other option for a temporary fix is to up your max connections count, however this won't improve the situation. Let me know if we can help you out. Drop me a line on ICQ: 342-801-972
__________________
Structure Northwest :: the cure for the common code :: AIM: Asatruel | Yahoo!: Asatruel | ICQ: 111-638-053 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Damn Right I Kiss Ass!
Industry Role:
Join Date: Dec 2003
Location: Cowtown, USA
Posts: 32,409
|
mysql_close($db); as the last line in your sql using php files. (assuming $db is the value assigned to the connection when you opened it).
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 | |
Confirmed User
Industry Role:
Join Date: Jan 2004
Location: Nor'easterland
Posts: 1,914
|
Quote:
This all assumes that PHP is being used. For all we know it's JDBC, DBD::Mysql or an ODBC connection from a windows box running apache...
__________________
~ ![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |