Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
Wrap connections in an N minute timeout to ensure they get reaped correctly #1725
Conversation
erikjohnston
added some commits
Dec 16, 2016
| + | ||
| + # Time this connection out if we haven't send a request in the last | ||
| + # N minutes | ||
| + reactor.callLater(3 * 60, self._time_things_out_maybe) |
| + return _WrappingEndointFac(transport_endpoint(reactor, domain, port, **endpoint_kw_args)) | ||
| + | ||
| + | ||
| +class _WrappingEndointFac(object): |
| @@ -61,6 +61,11 @@ | ||
| MAX_SHORT_RETRIES = 3 | ||
| +def test(conn): |
| + reactor.callLater(3 * 60, self._time_things_out_maybe) | ||
| + return res | ||
| + | ||
| + d.addCallback(update_request_time) |
erikjohnston
Dec 29, 2016
Owner
We schedule a timeout in 3 minutes both before we send the request, and after we received the response.
| + | ||
| + | ||
| +class _WrappedConnection(object): | ||
| + """Wraps a connection and calls abort on it if it hasn't seen any actio |
uhoreg
Dec 29, 2016
missing "n" in "action". Also, the comment says 5 minutes, but the code says 3 minutes?
NegativeMjark
changed the base branch from
develop
to
release-v0.18.6
Dec 29, 2016
NegativeMjark
merged commit 828c585
into
release-v0.18.6
Dec 29, 2016
5 of 7 checks passed
Sytest Dendron (Merged PR)
Build finished.
Details
Sytest Dendron (Commit)
Build #1276 origin/erikj/timeout_conn in progress...
Details
Sytest Postgres (Commit)
Build #2119 origin/erikj/timeout_conn succeeded in 9 min 25 sec
Details
Sytest Postgres (Merged PR)
Build finished.
Details
Sytest SQLite (Commit)
Build #2161 origin/erikj/timeout_conn succeeded in 8 min 22 sec
Details
Sytest SQLite (Merged PR)
Build finished.
Details
continuous-integration/travis-ci/push
The Travis CI build passed
Details
This was referenced Dec 30, 2016
Closed
erikjohnston
deleted the
erikj/timeout_conn
branch
Mar 29, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
erikjohnston commentedDec 29, 2016
No description provided.