My Ruby on Rails site is throwing sporadic 502 errors. It is running on Nginx, installed with Passenger, and is hosted on a server running Ubuntu 10.04. It seems that the errors are becoming more and more sparse, but they're still causing a problem.
I am guessing that it has something to do with buffer size, but am not sure.
I know there are a few other questions on here from people with the same problem, but it seems to be very peculiar.
Thanks in advance for any help or suggestions. I can give you any specs or version numbers that you may need.
#user nobody; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; events { worker_connections 1024; } http { passenger_root /usr/local/rvm/gems/ruby-1.9.3-p362/gems/passenger-3.0.18; passenger_ruby /usr/local/rvm/wrappers/ruby-1.9.3-p362/ruby; include mime.types; default_type application/octet-stream; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; gzip on; #buffer size proxy_buffers 8 16k; proxy_buffer_size 32k; passenger_buffers 8 16k; passenger_buffer_size 32k; passenger_max_pool_size 200; server { listen 80; server_name thelist.io; rails_env production; root /var/www/thelist.io/public; passenger_enabled on; } server { listen 80; server_name grant.XXXX.com; root /home/jackson/XXXX.XXXXX.com/; location / { index index.php; } location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } } server { listen 80; server_name localhost; #charset koi8-r; #access_log logs/host.access.log main; location / { root html; index index.html index.htm; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ \.php$ { root html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; include fastcgi_params; } # deny access to .htaccess files, if Apache's document root # concurs with nginx's one location ~ /\.ht { deny all; } } }