Closed ruslandoga closed 1 year ago
For context, this error gets logged when users switch between the month M
and year Y
periods on plausible.io faster than responses from clickhouse can arrive:
:cowboy_stream_h.request_process
exitYes, this is something we could do but note this is complicated because you may not know what was written on the socket when the query is aborted. For example, if you are in the middle of writing a query and aborts, then writing another query will leave you with mixed state. If you can guarantee this won't ever be the case for you, we could accept a PR that adds an optional callback that configures what happens in such cases (if such callback is not implemented, then we fallback to the current behaviour).
@josevalim Thank you for the information! I'll try and explore if we can ensure no incomplete requests. And if I'm successful, I'll either reopen this issue or open a PR :)
👋
When a caller starts a query and doesn't finish it before exiting,
db_connection
pool terminates thedb_connection
process.Would it be possible for
db_connection
to add an optional "cancel query" callback for adapters that support it? Stopping the process completely seems a bit suboptimal and noisy, but I understand the reasoning here as it's similar to linking and probably solves many edge cases.