项目上线之后正常,运行一段时间后,出现如下错误:
[yii\mongodb\Exception] exception 'MongoDB\Driver\Exception\ConnectionTimeoutException' with message 'No suitable servers found (serverSelectionTryOnce
set): [connection closed calling ismaster on xxxxx(内容敏感)]
我网上查了一下,大致是这个原因https://bbs.aliyun.com/read/283922.html
机器的fpm worker数为800 可能太多了。 而且mongodb官方也推荐使用长连接。
我这边用的确实是阿里云的mongo服务。所以想请教下解决方法。谢谢