Web Hosting Talk







View Full Version : PHP 4.2.2 and mySQL problems


Website Rob
07-31-2002, 08:52 PM
Anyone notice a problem with mySQL after upgrading to PHP 4.2.2 - from 4.1.2?

Upgrade was done today (but not by myself) and I'm now getting:
ERROR 1040: Too many connections

Some Perl scripts are also having problems and seem to be connected -- they were working fine before the upgrade. Mind you, I have to do something about this also: Disk hda6 (/var)100 % - disk space full

It's a Managed Server and I don't have root access, but Support seems to not be aware of the problem and/or very slow in responding to my Trouble Ticket about it. If I can work it out (with help, of course ;)) and provide them the answer, might help to speed things up.

Shyne
07-31-2002, 08:58 PM
I believe by default your mysql databases are stored in /var/mysql so clean up the /var directory.

Check /etc/my.cnf and see if number of connections have decreased. If so then increase it.

Ahmad
08-01-2002, 07:39 AM
My guess is that MySQL data are stored somewhere in /var. Because it is full, all write operations are hanging around trying and retrying all the time.

Because the problem is not relieved (disk is still full) the connections keep accumulating until they reach the designated limit. That is why you get: Too many connections.

This probably doesn't have anything to do with the PHP upgrade.

EDIT: if you want to move the data files to a larger partition (probably /usr), you will need first to delete some of the /var partition to allow the write operations to be done. After that you can stop mysqld safely. After, move the current MySQL data directory to a different partition, then make a simlink pointing the old path to the new path, then run mysqld again.

Website Rob
08-02-2002, 12:54 AM
Thanks for the replies.

Being as an upgrade to Apache 5.6 will cause some script problems (which I know from experience) I had wondered if the same might apply to PHP 4.2.2. I know PHP should have no effect on Perl, but PHP is not my forte which is why I had asked.

It does appear the root of the problems is with the "var directory" which is setup to only 250 MB. Why? I don't know, but unless made larger, or I can get the switch done as suggested by Ahmad, I can only see more problems ahead. :(

BTW, are you available Ahmad, for SysAdmin trouble-shooting and security inspecting, on a RedHat 7.x Server? If you are confident in your knowledge, have some experience and feel up to the task, then PM me and we'll talk further.