Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer 1

up vote 0 down vote accepted

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)
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.