Hi all,
I'm experiencing a timeout problem due to some prolonged inactivity. My system is made up of an B4A app that sends command codes to a B4J webserver which in turn builds appropriate SQL commands for a MySQL DBMS residing on the same machine as the webserver.
What seems the reason for the error showed in the attached png, is that at some time the SQL object initialized in the webserver looses contact with MySQL so, when it receive its next command code fron my app, it replies with an error 500 and the attached message.
I tried the following without success:
Although a note for Connector/J advices not to rely on the autoReconnect option, I tried it in the hope it could re-establish the connection. In a way it does, since sending again the same command from my app it succedes, but I'd like to intercept the initial disconnection at the webserver and immediately try again the command instead of returning at the mobile app and waiting for the user to repeat it.
So, probably my question should be about an eventual SQL object status to check before and after its use.
udg
I'm experiencing a timeout problem due to some prolonged inactivity. My system is made up of an B4A app that sends command codes to a B4J webserver which in turn builds appropriate SQL commands for a MySQL DBMS residing on the same machine as the webserver.
What seems the reason for the error showed in the attached png, is that at some time the SQL object initialized in the webserver looses contact with MySQL so, when it receive its next command code fron my app, it replies with an error 500 and the attached message.
I tried the following without success:
B4X:
sql1.Initialize2("com.mysql.jdbc.Driver", "jdbc:mysql://localhost/mytestdb?characterEncoding=utf8&autoReconnect=true","user","pwd")
Although a note for Connector/J advices not to rely on the autoReconnect option, I tried it in the hope it could re-establish the connection. In a way it does, since sending again the same command from my app it succedes, but I'd like to intercept the initial disconnection at the webserver and immediately try again the command instead of returning at the mobile app and waiting for the user to repeat it.
So, probably my question should be about an eventual SQL object status to check before and after its use.
udg