I often register this error in sub Handle of RDCHandler
This is the sub
Any idea ?
B4X:
2017-06-09 10:47:44 - RDCHandler_Handle error, (TimeoutException) com.mchange.v2.resourcepool.TimeoutException: A client timed out while waiting to acquire a resource from com.mchange.v2.resourcepool.BasicResourcePool@15975490 -- timeout at awaitAvailable()
This is the sub
B4X:
Sub Handle(req As ServletRequest, resp As ServletResponse)
Start = DateTime.Now
Dim q As String 'ignore
Dim in As InputStream = req.InputStream
Dim method As String = req.GetParameter("method")
Dim con As SQL
Try
con = Main.rdcConnector1.GetConnection
If method = "query2" Then
q = ExecuteQuery2(con, in, resp)
#if VERSION1
Else if method = "query" Then
in = cs.WrapInputStream(in, "gzip")
q = ExecuteQuery(con, in, resp)
'Log($"Command: ${q}, tool: ${DateTime.Now - Start}ms, client=${req.RemoteAddress}"$)
Else if method = "batch" Then
in = cs.WrapInputStream(in, "gzip")
q = ExecuteBatch(con, in, resp)
'Log($"Command: ${q}, tool: ${DateTime.Now - Start}ms, client=${req.RemoteAddress}"$)
#end if
Else if method = "batch2" Then
q = ExecuteBatch2(con, in, resp)
Else
Log("Unknown method: " & method)
resp.SendError(500, "unknown method")
End If
Catch
Log("RDCHandler_Handle error, " & LastException)
resp.SendError(500, LastException.Message)
If LastException.Message.Contains("0000-00-00 00:00:00") Then PurgeBadRecord
Dim TextWriter1 As TextWriter
TextWriter1.Initialize(File.OpenOutput(File.DirApp, "Restart.log",True))
TextWriter1.Write(DateTime.date(DateTime.Now) & " - RDCHandler_Handle error, " & LastException)
TextWriter1.Close
Main.robot.relaunchSelfbatch("jrdc.bat")
End Try
If con <> Null And con.IsInitialized Then con.Close
End Sub
Any idea ?