Hello, We're attempting to move our set of Rails and Sinatra apps from Passenger/REE to Unicorn/1.9.3. We've started with one of the Sinatra apps, which typically sees about 50 req/s. It happens to talk to both Redis (Resque) and MongoDB GridFS.
The basic setup works fine when tested under ab, but we're having trouble getting the deploy into production. It performs fine for a bit, then the nginx write queue fills up and begins returning 502s. A colleague has posted a more detailed description of the issue and our setup on ServerFault: http://serverfault.com/questions/398972/need-to-increase-nginx-throughput-to-an-upstream-unix-socket-linux-kernel-tun Additional information on the environment curbed@app1:~$ uname -a Linux app1 3.2.0-24-generic #39-Ubuntu SMP Mon May 21 16:52:17 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux curbed@app1:~$ ruby -v ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux] curbed@app1:~$ unicorn -v unicorn v4.3.1 curbed@app1:~$ nginx -V nginx version: nginx/1.2.1 built by gcc 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) TLS SNI support enabled configure arguments: --prefix=/usr/local/nginx --with-http_ssl_module --with-cc-opt=-Wno-error --with-http_gzip_static_module --with-http_stub_status_module --add-module=/home/curbed/src/nginx-modules/nginx-gridfs --add-module=/home/curbed/src/nginx-modules/ngx_http_redis-0.3.6 --add-module=/home/curbed/src/nginx-modules/headers-more-nginx-module Kernel tweaks: net.core.rmem_default = 65536 net.core.wmem_default = 65536 net.core.rmem_max = 16777216 net.core.wmem_max = 16777216 net.ipv4.tcp_rmem = 4096 87380 16777216 net.ipv4.tcp_wmem = 4096 65536 16777216 net.ipv4.tcp_mem = 16777216 16777216 16777216 net.ipv4.tcp_window_scaling = 1 net.ipv4.route.flush = 1 net.ipv4.tcp_no_metrics_save = 1 net.ipv4.tcp_moderate_rcvbuf = 1 net.core.somaxconn = 8192 net.netfilter.nf_conntrack_max = 131072 Any suggestions on configuration, kernel tuning, etc. would be welcomed (here or on SF). Please CC me if you answer through the list. Thanks for your time. Eliot -- Eliot Shepard Head of Tech, Curbed Network _______________________________________________ Unicorn mailing list - [email protected] http://rubyforge.org/mailman/listinfo/mongrel-unicorn Do not quote signatures (like this one) or top post when replying
