Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

optimized send_file does not release db connections #123

Closed
kares opened this Issue · 0 comments

1 participant

@kares
Collaborator

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
Closed

send_file doesn't really work with trinidad #90

@kares kares referenced this issue from a commit
@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)
abfbdea
@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.