Is the problem appearing when there is a pause in the chat session ? I'm not expert of XMPP protocol and I don't know if the clients or server sends keep alive packets. But it could be that if there are some firewall appliance on the path between the server and the customer, they drop inactive flows after a few seconds/minutes of inactivity.
Only an idea...
Sébastien Riccio
System & Network Admin
https://swisscenter.com