MongoDB connection timedout Exception

56 Views Asked by At

I have a Standalone Mongodb server in an EC2 Instance and my applications (PHP, IOS) from other EC2 instances is connecting to it.Many times i am getting below error when connecting to the mongodb.

MongoDB\Driver\Exception\ConnectionTimeoutExceptionPOST /api/v2/user/settings/set
No suitable servers found (`serverSelectionTryOnce` set): [connection timeout calling ismaster on '10.x.x.x:27017'] in the Bugsnag tool - an error reporting tool.

Anybody faced such issue.

Please help.

I checked mongodb logs and also health of the server and mongodb,it seems good. Also checked the max connections and it is 50k available and the current connection is just 500.I have allowed 27017 port in the security group for the app network.

I have checked on other threads and they say to check the env parameters is correct or not.its the same endpoint and credentials on all the applications i use.its working fine but with this above mentioned error.

0

There are 0 best solutions below