carenot
I see messages like this in Lightstreamer log.
[SYNTAX]
06-Jun-16 18:51:46,827|INFO |LightstreamerLogger.requests |FOR PUMPS PARKING DESTROYER|Closed session S43262ce8e2504b35T5139470 with internal cause code: 8 (Session count limit reached).[/SYNTAX]
I also see those in the log.
[SYNTAX]06-Jun-16 18:52:34,969|ERROR|LightstreamerLogger.requests |SERVER POOLED THREAD 10 |Max number of sessions (3500) set in the config file or via JMX reached.[/SYNTAX]
My question is what's the difference between those? Why should the first one happen at all, since the normal logic would be to reject new create session requests instead of disconnecting existing sessions?
Dario Crivelli
Since the setup of a session involves a few steps, we don't count sessions for the <max_sessions> check until the startup has completed.
During this startup, we count sessions as "prestarted" (for instance in the JMX statistics of the ResourceMBean).
If a session starts when <max_sessions> is reached, it is refused immediately with the second log message.
If the session starts and <max_sessions> is not reached, it is allowed; but it may be refused later, when it tries to exit the prestarted state, if other sessions have preceded it.
In this case, you will see both messages.