Skip to content


optimized send_file does not release db connections #123

kares opened this Issue · 0 comments

1 participant

JRuby Team member

originally reported as trinidad/trinidad#90 by @johnae

the work-around for the send_file encoding issue #107 introduced a regression in closing Rack's body 7b87c78
we shall keep and use the "optimized" file streaming (by unwrapping the body parts) but need to make sure the original body gets closed as well otherwise e.g. on Trinidad it was never releasing database connections and the server ended up hanging waiting for connections once pool size requests hit streamed a file.

@kares kares referenced this issue in trinidad/trinidad

send_file doesn't really work with trinidad #90

@kares kares added a commit that referenced this issue
@kares kares make sure original rack body gets always closed
the optimized send_file (work-around) added in 7b87c78 had a side effect of not closing the Rails body (ActionDispatch::Response that wraps the file to be sent) which might lead to side-effects such as not releasing database connections (reported as #123)
@kares kares closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.