4images Forum & Community
4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: ascanio on April 11, 2006, 12:24:49 AM
-
Hi every one
I just got an error that said Too many connections
so i read about that error
and i saw that the default max_connections on the my.cnf file was 100
so i went there i change that variable max_connections to 300
but im a newbie in all this stuff, I have my on dedicated server
so my questions are do you think this is too much?
do you have any advice for me in this topic?
Thanks
-
actualy, the problem is not in how many connections mysql allowed, but how much is the timeout for idlle connections...I'm still not sure how PHP communicates with mysql and why it leaves idlle processes after each connection, perhaps its mysql fault, I dont know, but in my case, I've solved this problem by changing wait_timeout setting in my.cnf
although, I just double checked mysql manual and it says that setting only affects TCP/IP connections and not socket-type connections...yet, I'm using socket type, so I dont know...
anyways, try it yourself and see if it helps, also, you might want to check this page:
http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html
P.S.
you can compare how many idlle connections and how long they where idlle from phpmyadmin before and after this change ;)
-
Thank you I made those changes but im still getting an error:
DB Error: Could not connect to the database server (localhost, jaimeascanio).
so i went to the bash i typed apachectl restart and i the site was working again
and this how my my.cnf looks like
(http://i2.tinypic.com/v8k65g.png)
do i need to restart something to make the changes?
-
yes, you need restart mysql server
-
do you know the command to do that?
-
mmmm.....I dont know what system do you use, on FC4 I use
/etc/rc.d/init.d/mysql restart
-
I have fedora code
i used that i got this
[root@...... tmp]# /etc/init.d/mysqld start
Timeout error occurred trying to start MySQL Daemon.
Starting MySQL: [FAILED]
[root@bigboy tmp]#
i also used
service mysqld restart and i got the same error
so i went back to my file my.cfn and i removed the changes that i made and i restart again and it worked but i didn't have any speling errors
so im not allow to make chages in that file? :?
-
hello,
i somethimes have the problem my pages doesn't load for 20-30 sec. Then i get the error " server not found".
After some sec, all works fine again.
I think this could have to do something with the timeout time for idle connections.
In my my.cnf file i dont find any "wait_timeout" line.....
I only see edited
XXXXXXXXXXXX
should i add "wait_timeout=30 " ?
thx
-
yes