I'm having an issue with my server, where XMPP server (MongooseIM) send times out.
Scenario: MongooseIM runs on EC2, user connects first time, it connects perfectly. Then, i disable this connection, and try to connect with same user. Error that i get.
1404224951 [INFO]: Connecting to tcp://xxx-xx-xxx-xxx-xxx.us-west-1.compute.amazonaws.com:5222
PHP Warning: stream_socket_client(): unable to connect to tcp://xxx-xx-xxx-xxx-xxx.us-west-1.compute.amazonaws.com:5222 (Connection timed out) in /home/ubuntu/xmppphp/XMPPHP/XMLStream.php on line 313
1404224981 [ERROR]: Could not connect.
However, when i wait more than 10 min, i can connect without any problem. I've used this guide to tweak TCP settings, i believe that's the error. Guide to TCP tweaking
Can anyone point me in the right direction? Where i'm doing wrong?