When connection queue is full, respond with a 503 error.#745
When connection queue is full, respond with a 503 error.#745webknjaz merged 1 commit intocherrypy:mainfrom
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
05f2bee to
57206a1
Compare
ead7721 to
97a6317
Compare
|
So now it ... fails, but not as consistently? I don't really know. |
|
Any other thoughts? It's pretty annoying that it passes some of the time but not all the time. |
45698b9 to
4a5abc5
Compare
|
Looks like we're down to only 3.14 failing, which were already failing on |
c532189 to
b460ce4
Compare
|
Failures are due to 3.14 and #747, unrelated to this PR as far as I can tell. |
e4edaae to
dab349d
Compare
|
@itamarst i've hit rebase on GH UI post a few CI fixes to |
|
Maybe that's why the |
dab349d to
8edc162
Compare
|
Seems better maybe with |
8edc162 to
71f7254
Compare
|
@webknjaz back to you! |
|
@itamarst one thing I forgot to ask for is adding a change note for Towncrier. Could you do that? |
|
@itamarst I think this is mostly ready, short of the requests above. When writing a change note, https://cheroot--745.org.readthedocs.build/en/745/history/#to-be-included-in-the-next-release can be used to preview rendering and compare the writing style with the surrounding text. |
The 503 responses are run in a thread
71f7254 to
fd19874
Compare
|
OK back to you @webknjaz |
webknjaz
left a comment
There was a problem hiding this comment.
Wonderful! Thanks for the contrib.
| # We can't just raise an exception because that will kill this | ||
| # thread, and prevent 503 errors from being sent to future | ||
| # connections. | ||
| self.server.error_log( |
There was a problem hiding this comment.
There is no self.server within HTTPServer.
There was a problem hiding this comment.
Good catch! I filed #797 to track this as I missed it originally. @martin-vi would you like to send a quick PR?
@itamarst if hit, this would cause the problem the comment above warns against, right?
❓ What kind of change does this PR introduce?
❓ What is the current behavior? (You can also link to an open issue here)
When connections can't be handled, the connection is just closed.
❓ What is the new behavior (if this is a feature change)?
A 503 error is returned, as suggested in TODO comment in relevant part of the code.
Since writing to the socket is blocking, this is done in a thread.
📋 Other information:
For some reason OpenStack Ironic needs this apparently, I didn't dig into why.
📋 Contribution checklist:
(If you're a first-timer, check out
this guide on making great pull requests)
the changes have been approved
and description in grammatically correct, complete sentences
This change is