Help, Bad gateway 502 varnish + nginx upload file

Hello… i’m bew in here, first i’m sorry for my bad english and wrong
place
for posting.

y problem. I have a server which is installed varnish and nginx as proxy
site and serve static pages. It run smooth, all can work together,
apache
for serving dynamic pages, varnish cache from apache, and nginx as
proxy.
Now the problem, when i upload something like attachment on my web
email, it
show Bad Gateway 502.
so weird, i upload smaller file arround 100kb, show bad gateway too…
i check the buffer and increase it, but it didn;t solve this problem…

i get an error from vhost-log nginx.
recv() failed (104: Connection reset by peer) while reading response
header
from upstream.

Any clue about this? i really really appreciate who help me out this
problem.

Thanks.

On Fri, Jul 22, 2011 at 7:11 AM, Benz C. [email protected]
wrote:

i get an error from vhost-log nginx.
recv() failed (104: Connection reset by peer) while reading response header
from upstream.

Any clue about this? i really really appreciate who help me out this
problem.

Does it work without varnish?

You need to use pipe() on varnish for uploads; make sure you check
your timeout setting.

Default pipe timeout is 60 seconds, which might not be long enough.

Stefan