Feature #6579
openKeep-alive time just for first signal
0%
Description
Hello,
We're using wt server in some customers that use networks monitors to check service avalibity, this tools usually ping a server each minute or half a minute to check if the service is alive.
When using "dedicated-process" this means that each ping will generate a new process consuming a considerable amount of memory, this sessions will not be closed until the the defined timeout is reached.
I beleive that after a session is created, if we don't receive a keep alive, lets say, 5 seconds, the process/session should be close directly.
Controlling first keep-alive/timeout in a different way can helps a lot with this kind of services.
Best regards
J.Rey
Updated by Roel Standaert about 6 years ago
We use service monitoring, too, but we just do a request for a static file somewhere in the docroot. No session is created in that case, and thus no session process.
You could also make a static WResource
for that. That will also not generate a new session.
Updated by Roel Standaert about 6 years ago
Oh, another option is to actually make the session, but check for a certain parameter or something. If it's just a monitoring request, you can call quit()
immediately, but I think someone reported a bug related to calling quit at construction, I'll have to look at that first.
Updated by José Luis Rey about 6 years ago
Hello Roel,
Thanks for the info, the static request/WResource is not an option (we really want to know that everything is up, database, network resources, etc, so we create real sessions like the app does).
Finally we added a url parameter for monitoring, and just start a new thread when monitoring detected, that kill the isolated process as soon as the response to the query has been sent.
Thanks again,
J.