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年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ