几分钟后在我的服务器上运行Sails.js应用程序无法访问的MongoDB

时间:2021-09-25 02:51:26

I want to create an API service for a project. I'm creating this service with Sails.js. I pushed this Sails app on my dedicated server running with pm2.

我想为项目创建API服务。我正在用Sails.js创建这个服务。我在使用pm2运行的专用服务器上推送了这个Sails应用程序。

My problem is that each 2 minutes I can't access to the data of my MongoDB database, running on my server. When I check the log I can see the connection open and 2 minutes later the logs say that the connection is ending.

我的问题是每2分钟我无法访问我的服务器上运行的MongoDB数据库的数据。当我检查日志时,我可以看到连接打开,2分钟后,日志说连接正在结束。

几分钟后在我的服务器上运行Sails.js应用程序无法访问的MongoDB

And when I restart the app the service is working for a few times.

当我重新启动应用程序时,该服务正在运行几次。

Anyone have an idea to resolve this problem ?

有人有想法解决这个问题吗?

Thank you,

ADR.

1 个解决方案

#1


This is related to a known issues with connection time out. Here are the relevant links and fixes.

这与连接超时的已知问题有关。以下是相关链接和修复。

https://github.com/balderdashy/sails-mongo/issues/275#issuecomment-101288312 https://github.com/balderdashy/sails-mongo/pull/277

#1


This is related to a known issues with connection time out. Here are the relevant links and fixes.

这与连接超时的已知问题有关。以下是相关链接和修复。

https://github.com/balderdashy/sails-mongo/issues/275#issuecomment-101288312 https://github.com/balderdashy/sails-mongo/pull/277