# Proxy\_next\_upstream

**URL:** <https://www.ruby-forum.com/t/proxy-next-upstream/244188>\
**Category:** NGINX\
**Created:** [March 3, 2016, 4:56am UTC](https://www.ruby-forum.com/t/proxy-next-upstream/244188 "2016-03-03T04:56:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sadaf\_N](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/858c86/32.png) [@Sadaf\_N](https://www.ruby-forum.com/u/Sadaf_N)\
**Post date:** [March 3, 2016, 4:56am UTC](https://www.ruby-forum.com/t/proxy-next-upstream/244188/1 "2016-03-03T04:56:14Z")

</div>

Does the proxy\_next\_upstream “timeout” apply to both connect timeout and  
read timeout?  
Is it possible to configure proxy\_next\_upstream to use connect timeout  
only, not the read timeout? In case a connection is made and the request  
is  
sent, I don’t want to re-try next upstream even when the read timeout  
happens. Retry in this case could cause damage to the upstream  
(duplicate  
payment, etc).

Can someone also give some example of “error” or “invalid\_header”? Are  
they  
100% safe, meaning not causing upstream to process the request twice? Am  
I  
right that the only real safe is the connect timeout?

Thanks!  
Frank
