Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

In last 15-20 days I have noticed a problem on one site. The site has two image galleries, one is an old static HTML gallery made few years ago and another, main, is powered by ZENPhoto CMS. Also I have that same gallery CMS on another two sites on that same VPS.

Problem is that after some time, loading of PHP generated pages site becomes very slow, or I get 503 Service Temporarily Unavailable error. But, problem is just with PHP generated pages, old part of site with static .html pages are working fast and just fine at the same time. All static .html pages working fast even when all other PHP generated pages load slow or inaccessible.

Also other two sites with same CMS gallery and other two more sites on that VPS with different PHP driven image gallery are working fine on that same VPS at the same time.

So, when site starts to hangs, ONLY PHP generated content is not working, like I said other static pages are working. Then I need to restart Apache, after restart everything is working nice and fast, for some time, than again, just PHP pages on that one site are becoming slower. If I do not restart apache that slowness take some time (several minutes, hours, depending of traffic) and during that time PHP driven content is loading very slow or unavailable on that site. After some time, on moments everything start to work and is fast again for some time, and again. In hours with more traffic PHP content is loading slowly or it is unavailable, in hours with less traffic it is sometimes fast and sometimes little bit slower than usually.

And ones again, only on that site, and only PHP driven pages, static pages are working fast even in most traffic hours.

Site is losing visitors, whenever it starts to slowdown.

Also I noticed that during weekend, site is working much better, probably because of less visitors.

When the site starts to slow down I can see something like this in the Apache status:

mod_fcgid status:
Total FastCGI processes: 37 
Process: php5  (/usr/local/cpanel/cgi-sys/php5)
Pid Active Idle Accesses State
11300   39   28   7   Working
11274   47   28   7   Working
11296   40   29   3   Working
11283   45   30   3   Working
11304   36   31   1   Working
11282   46   32   3   Working
11292   42   33   1   Working
11289   44   34   1   Working
11305   35   35   0   Working
11273   48   36   2   Working
11280   47   39   1   Working
10125   133  40   12  Exiting(communication error)
11294   41   41   1   Exiting(communication error)
11277   47   42   2   Exiting(communication error)
11291   43   43   1   Exiting(communication error)
10187   108  43   10  Exiting(communication error)
10209   95   44   7   Exiting(communication error)
10171   113  44   5   Exiting(communication error)
11275   47   47   1   Exiting(communication error)
10144   125  48   8   Exiting(communication error)
10086   149  48   20  Exiting(communication error)
10212   94   49   5   Exiting(communication error)
10158   118  49   5   Exiting(communication error)
10169   114  50   4   Exiting(communication error)
10105   141  50   16  Exiting(communication error)
10094   146  50   15  Exiting(communication error)
10115   139  51   17  Exiting(communication error)
10213   93   51   9   Exiting(communication error)
10197   103  51   7   Exiting(communication error)
Process: php5 (/usr/local/cpanel/cgi-sys/php5)
Pid Active Idle Accesses State
7983   1079   2    149   Ready
7979   1079   11   151   Ready
Process: php5  (/usr/local/cpanel/cgi-sys/php5)
Pid Active Idle Accesses State
7990   1066   0    57   Ready
8001   1031   64   35   Ready
7999   1032   94   29   Ready
8000   1031   91   36   Ready
8002   1029   34   52   Ready
Process: php5  (/usr/local/cpanel/cgi-sys/php5)
Pid Active Idle Accesses State
7991   1064   29   115   Ready

When it is working nicly there is no lines with "Exiting(communication error)"

Active and Idle are time active and time since last request, in seconds.

CPU is a dual quad-core E5440 Xeon (2.83GHz).

Running Linux 2.6.18-028stab099.3, x86_64.

Output of free:

             total       used       free     shared    buffers     cached
Mem:       8388608     882164    7506444          0          0          0
-/+ buffers/cache:     882164    7506444
Swap:            0          0          0
Total:     8388608     882164    7506444

Current Disk Usage:

Filesystem            Size  Used Avail Use% Mounted on
/dev/vzfs             100G   34G   67G  34% /
none

System Details:

Running on: Apache/2.2.22

System info: (Unix) mod_ssl/2.2.22 OpenSSL/0.9.8e-fips-rhel5 DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_fcgid/2.3.6

share|improve this question

1 Answer 1

You're running in a Virtuozzo VM, the first choice of too-cheap-to-care budget VPS hosting providers. Chances are the problem is simply that someone else is hammering the snot out of the host machine, and you're getting caught in the cross-fire. If performance is important to you, I'd recommend switching to a provider that doesn't over-contend their hosts.

share|improve this answer
    
Which hosting company do you recommend? –  user1038179 Jul 6 '12 at 4:46
    
@user1038179: serverfault.com/q/292013/1375 –  womble Jul 6 '12 at 4:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.