[GitHub] [couchdb] nickva commented on pull request #4729: Fabric workers should exit if the client exits

2023-08-22 Thread via GitHub
nickva commented on PR #4729: URL: https://github.com/apache/couchdb/pull/4729#issuecomment-1688590578 I managed to find a way to seemingly detect the connection state change after the local client (curl) disconnects by querying the equivalent of `getsockopt(fd(), IPPROTO_TCP,

[GitHub] [couchdb] nickva commented on pull request #4729: Fabric workers should exit if the client exits

2023-08-21 Thread via GitHub
nickva commented on PR #4729: URL: https://github.com/apache/couchdb/pull/4729#issuecomment-1686663150 > it ought to kill the process/port for the socket, which I think will kill the mochiweb process, but subject to testing It doesn't hurt to try I don't see how that could plausibly

[GitHub] [couchdb] nickva commented on pull request #4729: Fabric workers should exit if the client exits

2023-08-21 Thread via GitHub
nickva commented on PR #4729: URL: https://github.com/apache/couchdb/pull/4729#issuecomment-1686633468 On localhost `keepalive` won't behave any differently for disconnects, as network handling is just a direct callback into the other peer's socket code at the kernel level. In other words

[GitHub] [couchdb] nickva commented on pull request #4729: Fabric workers should exit if the client exits

2023-08-21 Thread via GitHub
nickva commented on PR #4729: URL: https://github.com/apache/couchdb/pull/4729#issuecomment-1686478247 In principle at least the experimental `socket` module does allow `peek`-ing with `recv` since OTP 24.0: https://www.erlang.org/doc/man/socket#type-msg_flag > ``` msg_flag()

[GitHub] [couchdb] nickva commented on pull request #4729: Fabric workers should exit if the client exits

2023-08-18 Thread via GitHub
nickva commented on PR #4729: URL: https://github.com/apache/couchdb/pull/4729#issuecomment-1684533075 > I confirmed directly and via haproxy that a client that disconnects (curl and CTRL-C in the first case and simply doing something that hits haproxy's server timeout like