Hello,
After server OS (Debian) reinstallation everything was OK and I opened my website to the visitors. After some time I noticed that Apache periodically becames very slow. I can 10-20 clicks and pages load immediately. Then for some 1-2 minutes I can hardly open some page. Then it works fast again. Sometimes 50% of the images on the page load very fast. Then loading freezes for some time, then continues loading again.
Other users report the same problem.
There are no spammers sending spam from this machine or something like that.
When this problem happends, everything runs fast on the server, except Apache. Server load is only ~0.2 - 0.3.
Apache configuration file has default settings and I was running this website with the same scripts and with th same Apache default settings for a long time. Never had problems.
Hostname lookups are disabled.
Any ideas?
PHP Code:
=============================
apache2.conf
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
<IfModule mpm_prefork_module>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 150
MaxRequestsPerChild 0
</IfModule>
<IfModule mpm_worker_module>
StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>
===================================
my.cnf
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 128K
thread_cache_size = 8
query_cache_limit = 1M
query_cache_size = 16M
=============================
cat meminfo
MemTotal: 3629392 kB
MemFree: 2907752 kB
Buffers: 32120 kB
Cached: 358672 kB
SwapCached: 0 kB
Active: 434180 kB
Inactive: 242340 kB
HighTotal: 2749072 kB
HighFree: 2096336 kB
LowTotal: 880320 kB
LowFree: 811416 kB
SwapTotal: 7815544 kB
SwapFree: 7815544 kB
Dirty: 3200 kB
Writeback: 0 kB
AnonPages: 285700 kB
Mapped: 13596 kB
Slab: 22544 kB
SReclaimable: 12436 kB
SUnreclaim: 10108 kB
PageTables: 6608 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 9630240 kB
Committed_AS: 962492 kB
VmallocTotal: 114680 kB
VmallocUsed: 6236 kB
VmallocChunk: 108004 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 4096 kB