Mysql/Apache Connection problems...
Ok, Ive had this problem once before, and I fixed it by doing a system reinstall. But that isnt an option at this moment...
Dual PIII 500mhz
18gb 10,000rpm SCSI Drive
10/100 EtherExpress Nic (eepro100 driver module)
Running Debian 3.0r1 w/kernel 2.4.20 (SMP enabled)
Co-Located with an ISP on 5-6 T1 Lines
I just did a system reinstall this weekend, and after I got the box locked back in the ISP's server room, and back home, and was finishing up the configuration remotely, I noticed that I have this peculiar MySQL issue *again*. The issue is this...
Connections to databases via Php/Apache are randomly dropped (or so it seems). About 1 in 7 attempts ends up generating the following error message:
Looking through my log files, for all the good connect requests, it logs that it connected as the proper user (root) in this case, but when it generates this error, the connection was made as (www-data@localhost as anonymous) and is denied the select request. I have found a temporary solution which is to change all "mysql_connect" statements to "mysql_pconnect", but this is a pain, and I dont want to force all the sites that I host to use that. I have also noticed the speed in which my server displays websites is definately slower.
Before my system reinstall, i was running kernel 2.4.19 without SMP support, and MySQL worked fine. When I last had this problem, it was running a kernel with SMP enabled. Has anyone ever encountered this problem before? I have talked with friends who are sysadmins at ISP's and have worked with debian/apache/mysql/php for years and have coded total network control apps with php/mysql on massive servers, and NONE of them have ever encountered this issue, or have been able to help me fix it.
From the log files it appears that the problem isnt with mysql, but apache/php... And since it has only happened when I had SMP support, I am thinking that that could possibly be the cause. I have also heard rumors of a certain "switch" in apache's config to improve performance on SMP or something on that line. Could this be the problem?
I really do not want to go through another reinstall, as my box is 3 hours away, locked in a server room that I have to schedule a time to go in, take it out, then schedule a time to put it back.
Does anyone have any ideas? Ive been working on this issue since Saturday night, and have run out of ideas...
Did you apt-get php and myql and apache, or did you compile it by hand? Found another guy who had similar problems and fixed it by compiling with a flag...(quoting:)
Yes, I apt-get'ed apache mysql-server php4 php-mysql etc...
Ill give recompiling php a try....
But why this problem only exists when my box is running SMP and is fine when its not is really an enigma...
|All times are GMT -5. The time now is 08:27 AM.|