Z
Z
Zhandev2018-03-23 21:30:30
MongoDB
Zhandev, 2018-03-23 21:30:30

Reverse reconnect to mongodb from nodejs app?

Hello.
There is a bot application on koajs and a database on mongo.
The database is stored on a separate mlab server.
A few days later, the bot stopped responding, the logs said that the required entry could not be found.
Restarted the application, everything worked.
Can this if the connection is somehow interrupted, then the connection to the database server will not happen back.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
eternalSt, 2018-03-24
@Zhandev

The first step is to find out for what reason the database fell off. The second is to make replicas in order to increase the availability of data. Replication is made just for such cases.
UPD: I found a similar question on stackoverflow , maybe it will help

D
Dimonchik, 2018-03-23
@dimonchik2013

maybe
50/50

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question