No suitable servers found - socket timeout calling ismaster

0

Hi
We have a periodical error:
unable to query db: No suitable servers found (serverSelectionTryOnce set): socket timeout calling ismaster on 'XXXXXX-1.docdb.amazonaws.com:27017'

in our PHP app, usually 3-4 times per day.

our conditions:

  • app server is in the same region as documentdb

  • security group allows the connection (other query runs)

  • we have only one instance in the cluster (so I don't understand how this can be connected with ismaster reply from documentdb in case you have multiple instance setup)

  • the cloud watch metrics do not show anything unusual for the time when errors happen, same for the app server

  • usually, only one request fails, all others are ok, and the request itself is different (not the same query)

Thank you in advance.

dmqbee
已提问 4 年前1175 查看次数
1 回答
0

The exception explains connectivity issue between PHP application and the DocumentDB Cluster.

It could be due transient network error or application is exhausting total number of connections or it could be due to load on DocumentDB.
To rule out the network issue, you can setup a tcpdump if you see any pattern with timing.

Please also provide your exact connection string and instance details for DocumentDB cluster , would be great help to investigate.

PHP driver's default behavior only attempts server selection once. If you want ,you can also change this behavior in driver so that it can make additional attempts to connect after a socket failure.

AWS
Anva
已回答 2 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则