session keeps open

Hi

I have a Servoy 5 server on linux. And an application running with WebClient on this server.
once a client enters the application the session show up in the servoy-admin/clients, but if the client close the browser the session will stay alive forever, it will show as idle but never close. problem is there are many potencial users but a few licenses and so very fast the number of idle session overflow the max number of concurrent users.

Im looking for a way to auto-close this idle session as they will on a classic web service application, and also for a way to inform to the users at login form of the numbers of concurrent users at that moment.

thanks
Andres

Web CLient sessions do time out. Default time-out period is 30 mintes.

It’s the default time-out configuration of the Tomcat application server underlying the Servoy Application Server.

Using the function application.getActiveClientCount() you can get the number of connected clients.

Paul

But this sessions are still open 3 hours later … and report as idle at administration clients page.

is there a way to kill this sessions?

andres

That is odd.

are you sure that the timeout setting in the Tomcat configuration has not been altered?

And that the browsers in which the web clients were running are closed?

If so, any errors in the logs that might indicate an issue?

Paul

nothing strange at the logs, tomcat is untouched since servoy install,
clients will still show up at servoy-admin/clients as idle even two, three or more DAYS!
im thinking on using the curl solution published at servoy magazine, but it looks a lot as a Hack more than a solution.

even in servoy-admin/clientes/info it states las alive check: as many hours, or days ago …

We came across this problem once. Rebooting the Servoy application server solved it.

I’m having a similar problem with idle connections not closing, only in my case it’s with smart clients (no web client usage).

On a daily basis I have a database server where I have 20 max active & 20 max idle connections configured. At the start of day (really early in the morning when no one is on the system and we’re getting ready for the business day) I have zero clients connected and yet still have 15, 16, 17 or more idle connections. I verify each morning on the dataserver side that the connections are indeed there (ie. they’re not phantom).

I then restart the Application Server each morning prior to the client’s start of business to clear out the “leftover” idle connections.

One really important detail: I am running Dr. Maison’s User-Manager plug-in Version 1.0.0 and we do have code to disconnect idle clients after 60 minutes. It’s possible the plug-in is disconnecting idle smart clients but not closing the database server idle connections. However, not all sessions are being timed out this way- many are being closed actively and wouldn’t/shouldn’t go through the idle timeout/disconnect logic. I will check further with Patrick/Dr. Maison to see if this is where my problem is occurring (may need to update the plug-in), but I wanted to post to share and also see if anyone else has run into a similar problem.

Smart client connections are tunneling over 443.
No other configuration changes to Tomcat server from default config (ie. no change to timeout settings).
Application Server: 4.1.2
OS: CentOS Linux 5.3 32-bit
JRE: 1.6.0_11
Database dataserver: Sybase Adaptive Server Enterprise 12.5.4 64-bit

-Tony

I’m having a similar problem with idle connections not closing, only in my case it’s with smart clients (no web client usage).

On a daily basis I have a database server where I have 20 max active & 20 max idle connections configured. At the start of day (really early in the morning when no one is on the system and we’re getting ready for the business day) I have zero clients connected and yet still have 15, 16, 17 or more idle connections. I verify each morning on the dataserver side that the connections are indeed there (ie. they’re not phantom).

This is a feature, not a problem. Servoy uses connection pooling. Establishing a connection has some overhead that slows queries down. So once a connection is established and no longer used, it is put into the connection pool and listed as idle connection. If a connection is needed, it is taken from the pool. If the pool is empty, a new connection is established.

This has nothing to do with any plugins, but is a feature of Servoy. I don’t see any reason why the server should be restarted.

patrick:
This is a feature, not a problem. Servoy uses connection pooling. Establishing a connection has some overhead that slows queries down. So once a connection is established and no longer used, it is put into the connection pool and listed as idle connection. If a connection is needed, it is taken from the pool. If the pool is empty, a new connection is established.

This has nothing to do with any plugins, but is a feature of Servoy. I don’t see any reason why the server should be restarted.

Thanks Patrick for the post! I suppose this came from my misunderstanding of how the connection pooling works. I had run into some issues before with limits and I possibly confused active limits with idle limits.

@andres3cv: have you had this issue repeatedly, also after restarting the Servoy Application Server?

Are you using anything but the default Servoy plugins and beans maybe?

Paul

We have the same issues frequently now.
Filed a case under nr. 295716

Jeroen, what version are you running?
in 5.1.3 there is some fix in that direction: [fix] 291093 Weblclient is not killed from Client menu in Application Server (when browser is already closed)