Help - Search - Members - Calendar
Full Version: Weird Apache Problem (sorry, Long Post)
Linuxhelp > Support > Technical Support
caznetworks
Hi,

I'm running Apache 1.3.31 w/ PHP 4.3.7 on a Slackware 10.0 server, and have a strange problem:

The server in question runs several different sites using virtual hosting. One of these is very unreliable. After a few hours of running perfectly fine, it starts dropping the connection on about 40% of requests - leading to images not loading, apparent broken links, or just nothing at all.

Doing apachectl restart solves the problem for a little while, before it starts happening again. The only things I can think of that could be relevant are:

1 - The site in question gets substantially more traffic than the other sites running on virtual hosts, but still, we're only talking 5000-6000 pages (10-15k hits inc. images) per day.
2 - This particular site was put together in a hurry, and is dumping 20 or 30 lines of PHP 'Warning' notices into the Apache error log with each page viewing. Far from ideal (I'll get round to fixing it sometime) but it shouldn't be causing these problems should it?

I just can't think of any logical explanation for the problems. At the moment I have apachectl restart in the hourly cronjobs to try and minimise the (expensive) downtime, but this is definitely not an appropriate solution!

Any suggestions would be greatly appreciated.

Regards,

Alex
hughesjr
I haven't heard of this problem ... what kind of PHP warnings.

Sounds like a possible memory leak that is filling up all memory and then the swap space.

When the condition happens, what does top say for memory usage and swap info?
caznetworks
Thanks for the reply.

Most of the PHP warnings refer to missing array elements (like reading the contents of $_POST['x'] when input 'x' isn't on the form page any more).

I'll probably have to wait until the weekend to let it go down and do a top.

Some other very strange things have been happening on this machine:
One day, a 95MB JPEG, 130904.jpg, appeared in the virtualhost's web root. The webmaster couldn't explain how it got there, and the FTP log (FTP being the only way to access the server) showed no records of the file having been uploaded. A file with that name *may* have existed before - we use files with name format ddmmyy.jpg for daily news images - but these are only around 50-100kB in size.

I downloaded the file and tried to open it in GIMP - "invalid format". Hmm.... After a little unsuccessful digging to try and figure out where this came from, I moved it to a PC for further investigation.

I ran a portscan and chkrootkit, nothing unusual found.

The following day, the entire server went down. When I restarted it (a physical reset was the only option), there was a file, .130904.jpg.swp, reported as 176-something-GB! No chance of keeping this one, so I deleted it.

Maybe these problems are related, although I can't really see a link between a .jpg file and a possible Apache/PHP problem. Whichever way, it's quite worrying!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.