GNU screen freeze session if SSH is not connected

172 views Asked by At

I have a dedicated server (Inmotion) running a Java XMPP server through a screen session to keep it alive. Sometimes, after a long period, the execution of this Java XMPP server freeze and then when I connect to the SSH and reattach the screen session to see what is wrong, the execution defreeze itself and execute everything pending (send pending messages, queries to the DB, etc.) and it goes back to normal operation.

Note that I do nothing, I just connect to the SSH and reattach the screen session to read the output.

The period for this to happen is variable, sometimes hours, sometimes days later.

What can I do to avoid this behavior?

1

There are 1 answers

0
ChrisF On

I have discovered that if I have an ssh session in one of my screens, and that ssh session is interrupted, it freezes all of the screens (whether they are ssh'ing or not). In order to get out of this situation, if I navigate to the frozen ssh screen, and issue the following sequence to break the ssh session, it will unfreeze all of the screen sessions:

<Enter> ~ .