Hello,
I have a persistent problem with apache and jpg. Sometimes, jpg load fast, but a few hours later the loading stops in the middle or is very slow. The BW seems correct since I can download an iso 1mo/sec (
www.rpgsoluce.com/test.iso).
The problem occurs arbitrarily when you visit
www.rpgsoluce.com (news images, wallpapers, fanats in "medias" etc.). After a few tries and with "luck", the image (through javascript or direct image url) won't load (not time of day specific).
I think my config is correct (debian 6 x64) but I really do not understand why only "medium" size jpg cause problems, and no errors in apache logs (even in debug level).
Tried to delete htaccess, disable iptables, replace apache with nginx, mpm-worker with fastcgi, local dns, seperate images in static subdomain, memory_limit=512M in php.ini; nothing solved the problem.
Server : Xeon FIRST (
http://hosteur.com/serveur-dedie/)
Stats :
www.rpgsoluce.com/mrtg/
Apache config : timeout=150, keepalive=on, keepalivereq=170, keepalivetimeout=2, prefork (5, 5, 10, 140, 0)
iptables :
http://www.rpgsoluce.com/troubleshoot/iptables.txt
other commands :
http://www.rpgsoluce.com/troubleshoot/other.txt
top :
http://www.rpgsoluce.com/troubleshoot/top.jpg
htop :
http://www.rpgsoluce.com/troubleshoot/htop.jpg
iftop :
http://www.rpgsoluce.com/troubleshoot/iftop.jpg
wireshark capture from inside my nat when trying to display a 650ko jpg (problem case) :
http://www.rpgsoluce.com/troubleshoot/wireshark.jpg
corresponding split image :
http://www.rpgsoluce.com/troubleshoot/img.jpg
phpinfo :
http://www.rpgsoluce.com/troubleshoot/info.php
We can see that the server takes a very long time to send next TCP segment (line 1129). When an image loads fast, it is the same but the interval between PDU is low. The tcp window size is 57 (scaling factor 128).
Videos seem to work (when flv headers are not wrong) :
http://www.rpgsoluce.com/medias/videos/
Should I change net/core/rmem_max or net/ipv4/tcp_rmem values in /etc/sysctl.conf ? ...
Any suggestions to help me solve this?
Thank you.