I’ve posted this to rails-deployment as well.
I have to administer a medium size rails app (1’5 million requests
each day), recently I’ve switched from lighttpd + fcgi to apache +
mongrel. In the following lines I am going to describe the platform:
All machines are running Debian Etch, with 4 gb ram and dual core
intel32 processors. Web server runs debian’s apache 2.2.3-4 mpm worker
package and also NFS server, Two app servers runs 14 mongrels ach
one. There is two db servers, master running mysql5 (debian package)
with innodb and an slave server with myisam tables. This slave server
has 8 gb ram and has a memcached with 4 gb reserved.
We are experiencing problems in peak hours with timeout and slow
navigation on pages, also there are problems with some file uploads.
I’m investigating on improving quality of service on the site, and
I’ve reached to some proxy errors in apache log, with more than 300
simultaneous stablished connections on the webserver[1].
There are 4 kinds of proxy errors:
[Wed Oct 17 06:24:14 2007] [error] (111)Connection refused: proxy:
HTTP: attempt to connect to 192.168.10.154:21004 (bomer) failed
[Tue Oct 16 23:28:01 2007] [error] [client 67.142.130.19] proxy: error
reading status line from remote server bomber, referer:
http://www.google.com/search?hl=es&q=tipos+de+herramintas++++&lr=
[Wed Oct 17 07:14:11 2007] [error] (70007)The timeout specified has
expired: proxy: prefetch request body failed to 192.168.10.154:21013
(kgb) from 200.66.13
3.30 ()
[Wed Oct 17 07:16:54 2007] [error] [client 201.141.199.86] proxy:
Error reading from remote server returned by /myfiles/clubsx/Sin t??
tulo 007_0001(1).jpg, r
eferer:
http://www.espacioblog.com/clubsx/post/2006/06/04/los-archivos-chiwasnaked
With slow or moderated traffic mongrels works well (they use cpu and
appears in first lines of ‘top’ command) but with heavy traffic,
mongrels go down.
I am looking for help with solving this issues, I’ve been looking in
google about proxy errors, but what I’ve found haven’t helped, I can
provide more details if they can help.
Also I’ve been suggested to use nginx web server instead of apache,
but I am reluctant to use it, unless proven better than apache, can
anyone point me to technical argument for using nginx?
[1] $ netstat -nat |grep ‘:80’| grep ‘EST’ | wc -l
Thanks for your time.
Jacobo GarcÃa