Skip to content
Snippets Groups Projects
Commit 4090d823 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Solve the active_clients exceeds configured max_clients issue

e.g. with [Web] max_clients configured for 200, the following could occur:
sbbs: web  0522 HTTP [34.45.142.114] Session thread terminated (220 clients, 378 threads remain, 128627 served)

The issue was that the active_client count is incremented in the
http_session_thread(), but was being checked in the main web server/listening
thread.

So now we'll check in both threads, but allow more HTTPS/TLS client threads
(10 more) than the configured max, to allow for successfull sending of error
503 (up to a point), while HTTP (non-TLS) connections exceeding the configured
max will be immediately dropped without creating a session thread.

We now no longer increment the client highwater mark for connections that
exceed the maximum.

Also fix send_error() to not log the Connection: close\r\nContent-Length: 0\r\n
portion of 503 errors.
parent a4c1f908
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment