Jump to content

Weird Apache hangs


CancerMan

Recommended Posts

Hello,

I have been running a php web app on the below configuration for a few years now, all was fine and the server never went down. The server is set up with a lot of virtual hosts to allow customers to log into there own sites (all run off the same code and db however).

Recently it was decided to spruce up the app and so a rewrite was undertaken by a prior employee. This was tested fairly thoroughly and then made live in parallel with the old system. This is when the problems started, the new system keeps hanging. About once a day any requests to the virtual hosts running the new system start to just time out. The old system remains unaffected however!

OK I'm going to repeat myself just to make things clear. There are about 115 virtual hosts running on this server about 5 of which are running the new system. Only the new system ever goes down the old one is totally unaffected. When the new system goes down it takes down all the virtual hosts that are running it, even though one of those hosts its just a test system that's not in use. This test system uses a different copy of the code and a different db but yet still goes down.

If anyone has had a similar problem or can offer some advise this would greatly appreciated.

 

Apache: 1.3.33.

PHP: 4.3.10.

MySQL: 4.1.15

OS: Windows 2000

Link to comment
Share on other sites

Some new facts, I can now replicate the hang which is kind of helpful. I have also discovered it has something to do with the db, both html and php pages are served OK during the hang but any page making db requests just sits there forever. It appears that rapid requests for certain pages or refreshes cause the problem. I'm thinking along the lines of maybe these pages are not closing there connections to MySQL properly. Any ideas on this?

Link to comment
Share on other sites

- Are the MySQL versions the same between the systems?

- What table types are you using? InnoDB? If so, are you using transactions?

- How are you connecting to the database?

- Is there a limit on the number of connections?

- Have you checked MySQL's error log?

 

When the system hangs, use SHOW PROCESSLIST in mysql to see what is happening.

Link to comment
Share on other sites

1)Its the same instance of MySQL (so yes the same version).

2)Table types are MyISAM.

3)Using @mysql_connect to connect to MySQL and @mysql_select_db to select db.

4)Connection limit is 100 (have never seen it above about 10) although this does confuse me somewhat as I would have thought I would see more connections at times.

5)Yes I have checked the MySQL error log nothing in there of any use (no errors at all in the last couple of weaks)

 

The php is using a bit of free code to make db interactions easier (ezSQL).

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.