A lot of Clients with Solution <none>

I restarted Servoy Application Server yesterday evening. And today I restarted just after 12:00. Today I had 135 clients in Servoy using solution Webshop. A few minutes after the restart about 14 clients logged in, about 14 clients is normal.

and those clients are just loaded an showing under the solution “webshop” ?

are you sure that all those webclients did close there browsers and then 30+ minutes later they are still there on the server?

Yes they are just loaded and showing under the solution webshop.

  • Our timeout is set to 1. So when the webclients close the browser, the webclient should disappear after 1 minute.
  • Webclients can also use a logout button in the solution. When they use the button, we call application.exit(); This morning I checked one of the webclients that was still active. This user did use the button to logout.
  • Clientside we also check the actions of our users. When they are not active 30+, we also use application.exit(); to throw them out.

Hi Johan. We try to close idle clients using the following code. But after the application.exit(); the solution runs the scheduled job checkConnectionErrors for that client (and the client still is active). We try to stop this by adding removeAllScheduledJobs() but this doesn’t work. It shouldn’t be possible that a job starts after application.exit(); ?

function CheckActivity()
{
                var _lastActivity = globals.LastActivity;
                var _currentdate = new Date();

                var _interval = globals.getSystemSetting("axerrio.idleclienttimeout");

                if(_interval!= null && _interval != "" && _interval > 0)
                {              
                               var _difference = plugins.it2be_tools.dateDifference(_currentdate,_lastActivity,3);
                               
                               if(_difference > _interval)
                               {
                                               //logout the user
                                               if(globals.logOffReturnUrl)
                                               {
                                                               //application.showURL(globals.logOffReturnUrl, "_self");
                                                               application.showURL(globals.logOffReturnUrl, "_top");
                                               }

                                               //security.logout();
                                               removeAllScheduledJobs();
                                               application.exit();
                               }
                }
                
}

 

/**
* @properties={typeid:24,uuid:"F026BD97-AFF3-4006-A7A7-B15B4EBD5AC0"}
*/

function removeAllScheduledJobs()
{
/*           var _jobs = plugins.scheduler.getCurrentJobNames();
                for (var i = 0; i < _jobs.length; i++) 
                {
                               plugins.scheduler.removeJob(_jobs[i]);
                }
*/

                plugins.scheduler.removeJob("checkShoppingTime" + globals_to_webuser.login);
                plugins.scheduler.removeJob("checkReservationTime" + globals_to_webuser.login);
                plugins.scheduler.removeJob("checkShopOpen" + globals_to_webuser.login);
                plugins.scheduler.removeJob("checkConnectionErrors" + globals_to_webuser.login);
                plugins.scheduler.removeJob("checkIdleTime" + globals_to_webuser.login);
}

all those removes is already done by us, Servoy will delete the job’s when a exit/shutdown/solution close happens.

But maybe because the exit somehow hangs it doesn’t come that far, but that is only for clients where that deadlock when shutting down.

Besides that when a scheduler job would execute we still check if the client has the solution loaded before it can execute.
And the solution should be gone when you call close/shutdown

After a shutdown the client is not removed from the list in Servoy Server Administration > Clients, the client is still active on Solution: Webshop.
We get this error a lot in our logs:
"2011-08-08 16:08 pool-60-thread-1 ERROR com.servoy.j2db.util.Debug Exception calling form method ‘checkOnConnectionReset’ with arguments null on form 'frmWebshop’in async mode on solution null "

Example:

Time Thread Level Category Message
2011-08-08 16:12 pool-55-thread-1 ERROR com.servoy.j2db.util.Debug Throwable
java.lang.NullPointerException
at com.servoy.j2db.FormController.executeFunction(FormController.java:3841)
at com.servoy.j2db.plugins.ClientPluginAccessProvider$MethodExecutor.run(ClientPluginAccessProvider.java:548)
at com.servoy.j2db.server.headlessclient.WebClient.invokeLater(WebClient.java:528)
at com.servoy.j2db.plugins.ClientPluginAccessProvider$1.run(ClientPluginAccessProvider.java:439)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
2011-08-08 16:12 pool-55-thread-1 ERROR com.servoy.j2db.util.Debug Exception calling form method ‘checkOnConnectionReset’ with arguments null on form 'frmWebshop’in async mode on solution null
2011-08-08 16:10 pool-64-thread-1 ERROR com.servoy.j2db.util.Debug Throwable
java.lang.NullPointerException
at com.servoy.j2db.FormController.executeFunction(FormController.java:3977)
at com.servoy.j2db.FormController.executeFunction(FormController.java:3858)
at com.servoy.j2db.plugins.ClientPluginAccessProvider$MethodExecutor.run(ClientPluginAccessProvider.java:548)
at com.servoy.j2db.server.headlessclient.WebClient.invokeLater(WebClient.java:528)
at com.servoy.j2db.plugins.ClientPluginAccessProvider$1.run(ClientPluginAccessProvider.java:439)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
2011-08-08 16:10 pool-64-thread-1 ERROR com.servoy.j2db.util.Debug Exception calling form method ‘checkOnConnectionReset’ with arguments null on form 'frmWebshop’in async mode on solution null
2011-08-08 16:10 http-192.168.100.27-80-12 ERROR com.servoy.j2db.util.Debug Error rendering the page null
java.lang.NullPointerException
at com.servoy.j2db.server.headlessclient.dataui.WebEventExecutor.generateResponse(WebEventExecutor.java:541)
at com.servoy.plugins.BehaviorProvider.respond(BehaviorProvider.java:65)
at org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:302)
at org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:157)
at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1250)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:486)
at com.servoy.j2db.server.servlets.Zl.doGet(Zl.java:4)
at org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:160)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:567)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
at java.lang.Thread.run(Unknown Source)
2011-08-08 16:10 http-192.168.100.27-80-12 ERROR org.apache.wicket.RequestCycle null
java.lang.NullPointerException
at com.servoy.j2db.server.headlessclient.dataui.WebEventExecutor.generateResponse(WebEventExecutor.java:541)
at com.servoy.plugins.BehaviorProvider.respond(BehaviorProvider.java:65)
at org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:302)
at org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:157)
at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1250)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:486)
at com.servoy.j2db.server.servlets.Zl.doGet(Zl.java:4)
at org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:160)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:567)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
at java.lang.Thread.run(Unknown Source)
2011-08-08 16:08 pool-60-thread-1 ERROR com.servoy.j2db.util.Debug Throwable
org.mozilla.javascript.EcmaError: TypeError: Cannot read property “checkOnConnectionReset” from undefined (checkOnConnectionReset#3042)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3663)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3657)
at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3668)
at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3686)
at org.mozilla.javascript.ScriptRuntime.undefReadError(ScriptRuntime.java:3698)
at org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1417)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3343)
at script.checkOnConnectionReset(checkOnConnectionReset:3042)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2680)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:166)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:387)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3135)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:165)
at com.servoy.j2db.scripting.ScriptEngine.executeFunction(ScriptEngine.java:476)
at com.servoy.j2db.FormController.executeFunction(FormController.java:3977)
at com.servoy.j2db.FormController.executeFunction(FormController.java:3858)
at com.servoy.j2db.plugins.ClientPluginAccessProvider$MethodExecutor.run(ClientPluginAccessProvider.java:548)
at com.servoy.j2db.server.headlessclient.WebClient.invokeLater(WebClient.java:528)
at com.servoy.j2db.plugins.ClientPluginAccessProvider$1.run(ClientPluginAccessProvider.java:439)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
2011-08-08 16:08 pool-60-thread-1 ERROR com.servoy.j2db.util.Debug Exception calling form method ‘checkOnConnectionReset’ with arguments null on form 'frmWebshop’in async mode on solution null
2011-08-08 16:06 pool-52-thread-3 ERROR com.servoy.j2db.util.Debug Throwable
org.mozilla.javascript.EcmaError: ReferenceError: “globals_to_webuser” is not defined. (checkOnConnectionReset#2994)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3663)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3657)
at org.mozilla.javascript.ScriptRuntime.notFoundError(ScriptRuntime.java:3719)
at org.mozilla.javascript.ScriptRuntime.nameOrFunction(ScriptRuntime.java:1754)
at org.mozilla.javascript.ScriptRuntime.name(ScriptRuntime.java:1679)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3752)
at script.checkOnConnectionReset(checkOnConnectionReset:2994)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2680)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:166)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:387)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3135)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:165)
at com.servoy.j2db.scripting.ScriptEngine.executeFunction(ScriptEngine.java:476)
at com.servoy.j2db.FormController.executeFunction(FormController.java:3977)
at com.servoy.j2db.FormController.executeFunction(FormController.java:3858)
at com.servoy.j2db.plugins.ClientPluginAccessProvider$MethodExecutor.run(ClientPluginAccessProvider.java:548)
at com.servoy.j2db.server.headlessclient.WebClient.invokeLater(WebClient.java:528)
at com.servoy.j2db.plugins.ClientPluginAccessProvider$1.run(ClientPluginAccessProvider.java:439)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
2011-08-08 16:06 pool-52-thread-3 ERROR com.servoy.j2db.util.Debug Exception calling form method ‘checkOnConnectionReset’ with arguments null on form 'frmWebshop’in async mode on solution null
2011-08-08 16:01 pool-5-thread-23 ERROR com.servoy.j2db.util.Debug Throwable
java.sql.SQLException: I/O Error: Connection reset
at net.sourceforge.jtds.jdbc.TdsCore.executeSQL(TdsCore.java:1038)
at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:360)
at net.sourceforge.jtds.jdbc.JtdsStatement.executeQuery(JtdsStatement.java:1176)
at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.servoy.j2db.Za.Za.Zf.invoke(Zf.java:5)
at $Proxy8.executeQuery(Unknown Source)
at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
at com.servoy.j2db.Za.Za.Zl.Za(Zl.java:8)
at com.servoy.j2db.Za.Za.Zo.validateObject(Zo.java:19)
at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:833)
at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106)
at com.servoy.j2db.Za.Za.Za.getConnection(Za.java:141)
at com.servoy.j2db.server.Zc.Zo.Zf(Zo.java:579)
at com.servoy.j2db.dataprocessing.Zu.Za(Zu.java:323)
at com.servoy.j2db.dataprocessing.Zu.performCustomQuery(Zu.java:877)
at com.servoy.j2db.dataprocessing.FoundSetManager.getDataSetByQuery(FoundSetManager.java:1646)
at com.servoy.j2db.dataprocessing.JSDatabaseManager.js_getDataSetByQuery(JSDatabaseManager.java:804)
at sun.reflect.GeneratedMethodAccessor218.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:179)
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:353)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3666)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2680)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:166)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:387)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3135)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:165)
at com.servoy.j2db.scripting.ScriptEngine.executeFunction(ScriptEngine.java:476)
at com.servoy.j2db.plugins.ClientPluginAccessProvider$MethodExecutor.run(ClientPluginAccessProvider.java:511)
at com.servoy.j2db.server.headlessclient.SessionClient.invokeAndWait(SessionClient.java:1170)
at com.servoy.j2db.server.headlessclient.SessionClient.invokeLater(SessionClient.java:1160)
at com.servoy.j2db.plugins.ClientPluginAccessProvider$1.run(ClientPluginAccessProvider.java:439)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(Unknown Source)
at java.io.DataInputStream.readFully(Unknown Source)
at java.io.DataInputStream.readFully(Unknown Source)
at net.sourceforge.jtds.jdbc.SharedSocket.readPacket(SharedSocket.java:814)
at net.sourceforge.jtds.jdbc.SharedSocket.getNetPacket(SharedSocket.java:695)
at net.sourceforge.jtds.jdbc.ResponseStream.getPacket(ResponseStream.java:443)
at net.sourceforge.jtds.jdbc.ResponseStream.read(ResponseStream.java:102)
at net.sourceforge.jtds.jdbc.ResponseStream.peek(ResponseStream.java:87)
at net.sourceforge.jtds.jdbc.TdsCore.wait(TdsCore.java:3772)
at net.sourceforge.jtds.jdbc.TdsCore.executeSQL(TdsCore.java:1031)
… 38 more
2011-08-08 16:01 pool-5-thread-23 ERROR com.servoy.j2db.util.Debug Throwable
java.sql.SQLException: I/O Error: Connection reset
at net.sourceforge.jtds.jdbc.TdsCore.setRowCountAndTextSize(TdsCore.java:3748)
at net.sourceforge.jtds.jdbc.TdsCore.executeSQL(TdsCore.java:946)
at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:360)
at net.sourceforge.jtds.jdbc.JtdsStatement.executeQuery(JtdsStatement.java:1176)
at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.servoy.j2db.Za.Za.Zf.invoke(Zf.java:5)
at $Proxy8.executeQuery(Unknown Source)
at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
at com.servoy.j2db.Za.Za.Zl.Za(Zl.java:8)
at com.servoy.j2db.Za.Za.Zo.validateObject(Zo.java:19)
at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:833)
at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106)
at com.servoy.j2db.Za.Za.Za.getConnection(Za.java:141)
at com.servoy.j2db.server.Zc.Zo.Zf(Zo.java:579)
at com.servoy.j2db.dataprocessing.Zu.Za(Zu.java:323)
at com.servoy.j2db.dataprocessing.Zu.performCustomQuery(Zu.java:877)
at com.servoy.j2db.dataprocessing.FoundSetManager.getDataSetByQuery(FoundSetManager.java:1646)
at com.servoy.j2db.dataprocessing.JSDatabaseManager.js_getDataSetByQuery(JSDatabaseManager.java:804)
at sun.reflect.GeneratedMethodAccessor218.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:179)
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:353)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3666)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2680)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:166)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:387)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3135)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:165)
at com.servoy.j2db.scripting.ScriptEngine.executeFunction(ScriptEngine.java:476)
at com.servoy.j2db.plugins.ClientPluginAccessProvider$MethodExecutor.run(ClientPluginAccessProvider.java:511)
at com.servoy.j2db.server.headlessclient.SessionClient.invokeAndWait(SessionClient.java:1170)
at com.servoy.j2db.server.headlessclient.SessionClient.invokeLater(SessionClient.java:1160)
at com.servoy.j2db.plugins.ClientPluginAccessProvider$1.run(ClientPluginAccessProvider.java:439)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

those first null pointers are quite strange.
How fast do the schedulers call methods?

because in the MethodExecutor.run() method:

at com.servoy.j2db.plugins.ClientPluginAccessProvider$MethodExecutor.run(ClientPluginAccessProvider.java:548)

we ask for the form, make sure it is in a consistent state, then call executeFunction:

at com.servoy.j2db.FormController.executeFunction(FormController.java:3841)

and there the form is already destroyed… thats in time a split second later…

I will see if i can make that a bit more safe, but for now i guess the best thing to do is really make sure all jobs are destroyed before you call shutdown

I also see a few socket reset method coming from the database, those are also quite weird, you should check them.

Our shortest scheduled job runs every five seconds.

We tried to destroy all jobs before we call the shutdown with our function removeAllScheduledJobs(),
but this doesn’t work. It still calls the other scheduled job (which should be gone).

We have a lot of these socket resets, I think we need more error handling,
because in the Servoy Server Log I cannot see which database or solution while we have 23 database servers,
7 solutions and 3 batch processors.

i see you have 5 jobs running but what are all those times? if 1 is 5 seconds the other 7 another 9 and so on then a lot of jobs can happen at certain times.

And you can call removeJobs but there just can be 1 or 2 already in execute mode…

I guess what you can do is call removeJobs and then schedule a 1 time job that does the close/shutdown in lets say 15 seconds from now.

so give them all a bit more time to really shutdown

I will add a boolean for the return type of scheduler.removeJob() so that you can check if it worked according to the scheduler.

We made some changes in our code (at logout), now the server is running without problems for 1 day and 22 hours. Hope this solved the problem completely!

What happens when I update, it updates to 6. Or is there also a release of 5.2 available? Because a lot changed in 6…

I think that if you check out the Upgrade notes to Servoy 6.0, you’ll notice that there isn’t so much changed that causes you to make changes to your solution: http://wiki.servoy.com/display/DOCS/Upgrading+to+Servoy+6.0

Servoy 6 offers loads of new features and better Developer tools, but just getting your solution up and running in Servoy 6 should be very straight forward. Only when you want to reliably use some of the new features do you need to do some work adding JSDoc to get rid of warnings, but having those warnings doesn’t mean you cannot use a lot of all the other new features.

Paul

I notice that early in this thread the poster reported getting this error:

Exception calling form method ‘checkOnConnectionReset’ with arguments null on form 'frmWebshop’in async mode on solution null

We recently ran into this kind of error message on code that was running as a scheduled job. It only came up on some job runs, not all, and we couldn’t figure out what it meant. It was only when we ran the code ‘manually’ rather than as a scheduled job that Servoy accurately reported the error as a null pointer exception, and told us the offending line # in our code. It would be nice if Servoy had reported the bug like that even when the code was running as a scheduled job.

Is there something I should be doing differently so I get accurate error reporting in scheduled jobs? Is this something that I should log as a bug or enhancement request in the support system?

Thanks

that messages is not something that would cause a null pointer in your code (that i guess is being called)

I see “on solution null” so somehow the i guess scheduled method is being tried to executed but the solution is already closed.
Or that method did cause the solution to be closed. So that method did an application.exit()

Besides that if you see that message printed in your log, then you should also see the complete stacktrace being printed just above or below it…
That is what we do :

public void reportError(String msg, Object detail)
{
Debug.error(msg);
Debug.error(detail);
}

the msg == that message you have there
and the detail == the exception that really caused this.