I have a ruby app which runs under passenger and nginx. If i try to upload a largish file (eg 15+ meg), when it gets to 30s in, the upload restarts (according to chrome) and at the end of the next 30 seconds it gives up and i get a timeout.
Is there an option i can put in my nginx config to prevent this from happening? Here's what my current nginx config looks like:
worker_processes 1;
events {
worker_connections 1024;
}
http {
passenger_root /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.2;
passenger_ruby /usr/local/bin/ruby;
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
gzip on;
gzip_min_length 1000;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain application/xml text/css text/javascript application/x-javascript;
gzip_disable "MSIE [1-6]\.";
server {
listen 80;
server_name alekskrotoski.com;
root /var/www/apps/akrotoski/public; # <--- be sure to point to 'public'!
passenger_enabled on;
}
}
I'm not an nginx expert and have a feeling this might be obvious, hope so anyway. I already tried adding
proxy_read_timeout: 600;
to the server block but that didn't help.
Cheers, max
Best Answer
I just ran into this issue and seemed to have fix it by upping the
client_max_body_size
in my server'shttp
block: