Think I have the problem solved, for today far.

I found a setting on my mail server

"IMAP NOOP and IDLE commands trigger 1 minute inactivity timeout"

I disabled that option and also increased the IMAP sessions timeout, it was 20min.

I am thinking of setting the minutes back to the 20 since I am feeling that the above described option was the actual problem.

Thanks to all who posted!