1

I have problem with my production nginx configuration (on my development machine with mongrel everything works). My environment is: nginx as proxy, rainbows as backend running rails 3.1 application with ruby 1.9.2.

When I'm trying to upload large file (more than 1MB) I see 502 error on my website and in nginx error log file:

2012/04/02 14:45:17 [error] 14415#0: *658 sendfile() failed (32: Broken pipe) while sending request to upstream, ....

What I've tried:

  • setting client_max_body_size 5m;
  • keepalive_timeout 600;

Uploading smaller files works fine. What could be the problem?

Adrian Serafin
  • 115
  • 1
  • 3

1 Answers1

0

After some time I've found that you have to repeat max file upload size setting in rainbows configuration file:

client_max_body_size(2 * 1024 * 1024)
Adrian Serafin
  • 115
  • 1
  • 3