Wait for backend

aT atif.ali at gmail.com
Wed Jun 27 12:01:48 UTC 2018


Look into  *proxy_read_timeout* *time*;

https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_read_timeout

*proxy_connect_timeout* *time*;

https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_connect_timeout

On Wed, Jun 27, 2018 at 1:57 PM duda <nginx-forum at forum.nginx.org> wrote:

> Hi
>
> I have one backend:
>
> upstream backend_1 {
>       server 127.0.0.1:35510;
> }
>
> and server:
>
> server {
>   ...
>   location / {
>         proxy_pass http://backend_1;
>   }
> }
>
>
> Sometimes I have to restart my backend and it is unavailable for 3-5sec
> (port unreachable)
>
> How I can tell nginx to "wait" for backend and do not respond with 502 ?
> So it should hold connection for 5 second and if it is unreachable in that
> interval responds 502 to client.
>
> Thanks
>
> Posted at Nginx Forum:
> https://forum.nginx.org/read.php?2,280293,280293#msg-280293
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>


-- 
Syed Atif Ali
Desk: 971 4 4493131
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20180627/3f60762f/attachment.html>


More information about the nginx mailing list