a31modela Posted February 18, 2008 Share Posted February 18, 2008 I am having a serious issue with my production mysql db for our web site. Multiple times during the day, my web site goes down with the message : Database Error: Unable to connect to your database. Your database appears to be turned off or the database connection settings in your config file are not correct. Please contact your hosting provider if the problem persists. When this happens, I can putty into the mysql server & verify that the daemon is running fine. I can enter mysql & run queries against the prod db with no problem. I can access the prod db on the prod server from my test mysql server with no problem either. I can open the MySQL Admin console from my laptop, and get into the db fine also as well as use the Query Browser. None of my Apache web servers will work however, either inside or outside the firewall. The only way to fix the problem thus far is to restart MySQL on the server & then everything is ok. I tried unsuccessfully to restart one of the web servers to fix it as well. Sadly I am new to both PHP & MySQL so this issue is killing me. I am restarting MySQL 3-4 X a day! Also this problem only started a few weeks ago. I also have 2 mysql servers and either one I use has the same issue. One thing I was looking at was a setting called mysql.connect_timeout. What i want to do is wait until it fails again & then point a test web server to the production db on the prod server & see if it works. If for some reason I lost network connectivity on the mysql server for say 65 seconds, that would end the connections from the web servers correct? Are the servers supposed to reconnect themselves or does MySQL hold a connection to the servers and by restarting mysql it reestablishes the connection ? Looking at any possible reason for this. Any help is greatly appreciated. MySQl Server - SuSE 10 sp1 VM instance , MySQL 5.0.26, phpadmin 2.11.4, Web Servers ( 4 total) - SuSE 10 sp1 VM instance, Expression Engine CM 1.6, Apache 2.23-16.9, php 5.1.2-29 I am also running 2 squid servers in my DMZ that error as well. Trying to address this issue independent of the DMZ to keep itt as simple as possible. Thanks, Steve Quote Link to comment Share on other sites More sharing options...
NL_Rosko Posted February 18, 2008 Share Posted February 18, 2008 did you try reading the log files, any errors there ? possible one or more tables are corupted and need repair Quote Link to comment Share on other sites More sharing options...
a31modela Posted February 18, 2008 Author Share Posted February 18, 2008 Yea, checked the log & there is nothing in any log files on any of the servers. If there was a corrupt table, would that prevent access fromanywhere remote? I have 4 web servers that connect to the MySQL box and they will all go down. Quote Link to comment Share on other sites More sharing options...
NL_Rosko Posted February 18, 2008 Share Posted February 18, 2008 Yea, checked the log & there is nothing in any log files on any of the servers. If there was a corrupt table, would that prevent access fromanywhere remote? I have 4 web servers that connect to the MySQL box and they will all go down. could be code issue, opened connections need to be closed once the request is done. Then too many connections open maybe. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.