Servoy server blocks

in the stacktrace i don’t see much,
The only thing what i see is that that most threads that do something are serving binary data, and that is logical if the memory usage is quite high then it has difficulties doing that.

I have no idea what all those clients are, and why they are constantly there, is the log not telling you a bit more then in onclose/shutdown/logout things go wrong? That could potentially kill a good close/shutdown?

If i look at our own server that has numerous Web,Smart and Headless clients, i don’t see 1 none client there, and it is running for 4 days at the moment.

I don’t know what that memory problem is that looks to me like a real specific linux/os problem. You didn’t change anything? for example changed the amount of memory the vm gets in between?

If your memory runs out it would be nice if you could dump a memory dump to see what is in memory, this can be done the easiest with jvisualvm that is in the JDK1.6/bin install dir

Could all those clients to cause the memory overload on the server which concluded in very slow performance and that NullPointerException from the WebClient? Why are they not released automatically, if anyway they serve nothing? Do I have to do anything to shut them down? I don’t understand why they are there. Are they using any resources?
When the user press Logout in our app I do this: (I discussed this with you on another topic, this is how I manage to get the login screen after the user logout)

	var host = globals.getPreferencesFoundSet().server_host;

	if (application.getApplicationType() == APPLICATION_TYPES.WEB_CLIENT) {
		application.showURL("http://" + host + "/webclient.html", "_top");

		application.exit();
		
	} else if (application.getApplicationType() == APPLICATION_TYPES.SMART_CLIENT) {
		elements.tabsMain.removeAllTabs();
		application.closeForm();

		security.logout("AeroPlus");
	}

What if the user closes the browser directly. Will that client be released?

We didn’t change anything to the server’s configuration, and it’s the first time we have this problem. It’s weird that it happened right after I tried to restart the server due to slow performance. And it’s the first time when I see so many clients there.

In the end I decreed the maximum memory of Servoy from 2Gb to 1Gb and it’s working even now. But you saw, the vps had enough free memory. Actually when I first start Servoy, after the vps reboot, the used memory was of ~800Mb and the free one of ~3200Mb.

if you logout then the client is not killed, thats only when you do shutdown()

The client is then only killed when the http session is invalidated by Tomcat/WebContainer then it should be cleared (after the timeout)

Where do I have to call shutdown()? I mean the place where to call it - onSolutionClose() ? - and the object to call to - application.shutdown() doesn’t seems to exist. Please enlighten me with more details. I really do not understand very well how to do it. Thanks!

sorry in js code it is called exit() so application.exit() right at the place where you now call logout()
logout() doesn’t kill the client, it just logs you out (and if the solution demands a logged in user it will also close the soluton)

Then I think we have a problem. In case of the webclient I called application.exit() without application.logout(). Will it work? I can’t call logout, as we discussed long before, I want the login screen after the logout. And you told me to do it this way:

		application.showURL("http://" + host + "/webclient.html", "_top");

		application.exit();

All the clients from the previous post are WebClients. So if the application.exit() did its job, then all of them didn’t logout, maybe close the browser (I think) and Tomcat didn’t do it’s job to invalidate the session. Anyway, for me, it’s still unclear what those clients were doing there.

Any other solutions?

exit is really exit, the client is destroyed, so you don’t need to logout, that is just implicitly also just done.

so yes showURL and exit is the way to go.
then the client should be gone, if you have a test case when that is not the case, please make a case in our system

The only replication is that from this morning. You saw that list of clients and I did called application.exit(). But to create a test case, that might take some time.

Anyway, thank you!