You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We noticed a problem last week when using long-lived client connections: The process running cowboy_http:loop/1 doesn't GC after sending the response body to the client.
In some cases, this can result in holding on to (e.g.) 10MiB or so of garbage before either the client sends another request, or reaching idle_timeout.
Would it be possible to trigger a GC after the response body has been sent? This would be similar to gen_server's hibernate, or the ssl application's hibernate_after option.
Obviously, we could set idle_timeout more aggressively, but that closes the connection, which seems to defeat the purpose of long-lived connections.
I can reproduce this against one of our internal cowboy-using applications by using some relatively simple gun client code. My example code uses HTTP/1.x, but we've seen this with (I think) a Go client using HTTP/2.
(cowboy 2.9.0, ranch 1.8.0)
The text was updated successfully, but these errors were encountered:
I guess it could hibernate automatically via an option as well after all messages if you don't expect much to happen. Option could be set both at startup and dynamically.
We noticed a problem last week when using long-lived client connections: The process running cowboy_http:loop/1 doesn't GC after sending the response body to the client.
In some cases, this can result in holding on to (e.g.) 10MiB or so of garbage before either the client sends another request, or reaching
idle_timeout
.Would it be possible to trigger a GC after the response body has been sent? This would be similar to
gen_server
'shibernate
, or thessl
application'shibernate_after
option.Obviously, we could set
idle_timeout
more aggressively, but that closes the connection, which seems to defeat the purpose of long-lived connections.I can reproduce this against one of our internal
cowboy
-using applications by using some relatively simplegun
client code. My example code uses HTTP/1.x, but we've seen this with (I think) a Go client using HTTP/2.(cowboy 2.9.0, ranch 1.8.0)
The text was updated successfully, but these errors were encountered: