Hello Jean-Marie,
So the second attempt was the right one. I used the changes above and got some verbosity from ice but I am unsure of what it means. Here is the log (edited to remove part related to my code and irrelevant).
I also attached the m-code used here.
If I manage to reconnect, the issue comes from the fact that sometimes, matlab keeps disconnecting and reconnecting 1000 of times, forking each time and at some point reaching the limit of the system. I have processes with 5000-8000 threads…
Does the ice messages evoke something to you? Should I use other flags to get more?
Furthermore, I don’t know if the ice message are flushed at everyline, i.e. if the “time order” of the log is correct.
Thank you for your help.
Best
Jacques
Called omeroKeepAlive at 2021-04-01__12-25-39
Then some operations kept matlab busy (pseudo-hanged) until an other call to keep alive below (which failed)
Called omeroKeepAlive at 2021-04-01__13-06-48
Warning: calling omero_session.keepAlive; I met the exception:
id: #MATLAB:Java:GenericException
message: Java exception occurred:
Ice.ConnectionLostException
error = 0
at IceInternal.AsyncResultI.__wait(AsyncResultI.java:276)
at omero.api.ServiceFactoryPrxHelper.end_keepAlive(ServiceFactoryPrxHelper.java:5772)
at omero.api.ServiceFactoryPrxHelper.keepAlive(ServiceFactoryPrxHelper.java:5655)
at omero.api.ServiceFactoryPrxHelper.keepAlive(ServiceFactoryPrxHelper.java:5642)
at com.mathworks.jmi.NativeMatlab.SendMatlabMessage(Native Method)
at com.mathworks.jmi.NativeMatlab.sendMatlabMessage(NativeMatlab.java:273)
at com.mathworks.jmi.MatlabLooper.sendMatlabMessage(MatlabLooper.java:120)
at com.mathworks.jmi.Matlab.mtFevalConsoleOutput(Matlab.java:1835)
at com.mathworks.jmi.MatlabMCR.mtFevalConsoleOutput(MatlabMCR.java:1236)
at com.mathworks.timer.MWCallback$callbackEvent.run(MWCallback.java:541)
stack: FILE : /home/jacques/svn_repository_fsfs2/Tracking_Matlab/Tracking_Matlab/rdir/OMERO.matlab/omeroKeepAlive.m FUNCTION : omeroKeepAlive/doKeepAlive LINE : 80
FILE : /usr/local/MATLAB/R2020b/toolbox/matlab/iofun/@timer/timercb.m FUNCTION : timercb LINE : 102
FILE : /usr/local/MATLAB/R2020b/toolbox/matlab/iofun/timercb.m FUNCTION : timercb LINE : 24
Stopping all omeroKeepAlive timers
Warning time stamp: 2021-04-01__13-06-48
Warning: Lost connection to secure session (and putatively the non secure session)
> In warning_perso (line 32)
In omeroAttemptReconnect (line 27)
In omeroKeepAlive/doKeepAlive (line 91)
In timer/timercb (line 102)
In timercb (line 24)
In sliding_analysis (line 83)
In meta_analysis (line 392)
In semibatch_partial1234_bis (line 116)
In xml_job_read_Omero (line 148)
Warning time stamp: 2021-04-01__13-06-48
Warning: Omero lost connection - (previous omeroKeepAlive call: 2021-04-01__11-33-47)
Total Mem used: 2.4707 GB, Max Mem for this java: 14.9336 GB, Free Mem: 0.981938 GB, i.e. 6.58%
Total number of garbage collections: 1141 Total time spent collecting (s): 95.187
(re)try to establish connection in 1 minute - Attempting reconnecting # 1
> In warning_perso (line 32)
In omeroAttemptReconnect (line 31)
In omeroKeepAlive/doKeepAlive (line 91)
In timer/timercb (line 102)
In timercb (line 24)
In sliding_analysis (line 83)
In meta_analysis (line 392)
In semibatch_partial1234_bis (line 116)
In xml_job_read_Omero (line 148)
-- 4/1/21 11:34:47:257 Network: established ssl connection
local address = 129.20.159.236:52134
remote address = 129.20.159.125:4064
-- 4/1/21 11:34:47:381 Network: established tcp connection
local address = 129.20.159.236:50092
remote address = 129.20.159.125:4063
-- 4/1/21 11:37:06:978 Network: closed tcp connection
local address = 129.20.159.236:50052
remote address = 129.20.159.125:4063
Ice.ConnectionLostException
error = 0
-- 4/1/21 12:37:06:978 Network: closed tcp connection
local address = 129.20.159.236:50092
remote address = 129.20.159.125:4063
Ice.ConnectionLostException
error = 0
-- 4/1/21 12:38:24:858 Network: closed ssl connection
local address = 129.20.159.236:52134
remote address = 129.20.159.125:4064
Ice.ConnectionLostException
error = 0
-- 4/1/21 13:06:48:339 Network: established ssl connection
local address = 129.20.159.236:52276
remote address = 129.20.159.125:4064
-- 4/1/21 13:06:48:341 Network: closed ssl connection
local address = 129.20.159.236:52276
remote address = 129.20.159.125:4064
Ice.ConnectionLostException
error = 0
We then clear all java object related to omero to let java do the garbage collection and then close omero connection (client.closeSession();), see omero_close_connection.m
close omero connections
And then I recreate the connection using memorized credentials.
2021-04-01__13-07-48 : info : Created omero client: omero.client@46df7d9b and session session-8c261b68-50ef-458c-baa0-1b95239b91b1/d6782e27-e14d-4789-9faf-41851c065a5a -t -e 1.1 @ BlitzAdapters
2021-04-01__13-07-48 : info : Retrieved non secured omero session: omero.client@67b2b30a and client session-4e2c0dfc-0b15-46f2-96ce-2f4d891a3f9f/d6782e27-e14d-4789-9faf-41851c065a5a -t -e 1.1 @ BlitzAdapters
2021-04-01__13-07-48 : info : Connection restored