Welcome! Log In Create A New Profile

Advanced

Question regarding stale sockets and EWOULDBLOCK

Felipe Polanco
November 07, 2023 04:18PM
Hello,

We have a situation with NGINX forward proxy and I would like the
community's input on how to handle this.

We run long-lived TCP sockets in our business, and we authorize transaction
requests on behalf of our customers.

We use NGINX as the TLS termination proxy.

We are experiencing issues when our customer's internal network goes down
but the link stays up, we send transactions to them but nothing comes back
(no TCP ACK). We see TCP retransmissions at this point.

At this point the NGINX send buffer starts filling up, until it reaches the
buffer maximum size but the socket is not dropped, we monitor it using
netstat output.

NGINX just does nothing nor logs any error when this happens, this scenario
is called EWOULDBLOCK socket error, we handle this in our application but
when we introduced NGINX we are now timing out transactions.

We cannot use proxy_timeout because these are long-lived sockets, some stay
up for months waiting for authorization requests.

Is there any option in NGINX that we can use to close the maxed out socket?

Thanks,
_______________________________________________
nginx mailing list
nginx@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Question regarding stale sockets and EWOULDBLOCK

Felipe Polanco November 07, 2023 04:18PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 237
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready