1. François Van Lerberghe
  2. as Embedded Server
  3. Воскресенье, Декабрь 27 2015, 10:13 AM
  4.  Подписаться через email
I want to find dead connection in order to cancel it.

VServer 5.8.8 - 5 connections license.
If a connection is falling in a not connected status (VConnection.isconnected = False) for any reason, the VServer keep this connection in memory. If 4 users are already connected, how can I know witch connection is dead in order to cancel it and allow a 5th user to open/reopen a connection ?
Комментарий
There are no comments made yet.
Ivan Smahin Ответ принят
VConnection is a vClient object - it does not matter for vServer. vServer counts connections in different way.

vServer destroys "connection" when:
- vClient does not pass login procedure (wrong credential...);
- vClient performs connection.Close;
- vClient suddenly disconnected (socket closed);
- connection timeout reached;

"dead" vClient connection is not connected to vServer anymore - you just can do nothing with it.
In some cases (different for Mac, Linux and Win) the "suddenly disconnected" vClients might be detected with some lag (usually few seconds but it could be minutes).
Комментарий
There are no comments made yet.
François Van Lerberghe Ответ принят
This doesn't seem to be what it's happening to me. It seems that the dead vClient connection is still in the VServer memory forever (or, if you say "some lag (usually few seconds but it could be minutes)", I would say perhaps some *days*).
This situation lead me to forbid a user to connect to the server if there are already 5 connections (as I have a 5 connections license) even if all of these connections (or some) are dead. And this force me to restart the server as I cannot connect anymore to the VServer from a VClient to cancel the dead connections.

And I haven't see any INI parameter to change this behavior. Or perhaps have I misunderstood the "MaxIdleClientTimeout" parameter that is set to 0 here. I don't think it is as the value of this parameter is in minutes and I need a way to reconnect in a few seconds.
Комментарий
There are no comments made yet.
Ivan Smahin Ответ принят
Please, send me a vServer log (VerboseMode = 3)
Комментарий
There are no comments made yet.
François Van Lerberghe Ответ принят
Done.
You will see that after the 5th broken (dead/not closed properly) connection, I cannot connect anymore as the server has kept in memory the 5 connections and thus (in my case) the connections limit is reached.
I would like to not be forced to restart the server in this case !
Комментарий
There are no comments made yet.
  • Страница :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.