Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse Server loses MongoDB connection when MongoDB server is restarted #1011

Closed
iOSDev33 opened this issue Mar 13, 2016 · 6 comments
Closed

Comments

@iOSDev33
Copy link

I am running a parse-server on a Digital Ocean droplet in addition to a MongoDB server on a separate Digital Ocean droplet. When i reboot or restart the MongoDB server the connection between parse-server and MongoDB is lost and requires a stop and restart of the parse-server to get things back up and running. Not sure why thats happening and is there anything to prevent it from happening? I was hoping that if the MongoDB server was ever rebooted that once it was finished parse-server would just reconnect automatically. Thanks for all the awesome work you guys are doing!

Make sure these boxes are checked before submitting your issue -- thanks for reporting issues back to Parse Server!

Environment Setup

2 Digital Ocean Droplets

1 = Parse-Server running on Digital Ocean
2 = MongoDB running on Digital Ocean

Steps to reproduce

Reboot MongoDB server or Restart MongoDB from command line

Logs/Trace

@kenglou
Copy link

kenglou commented Mar 14, 2016

maybe you are not making your MongoDB replica set, so when the time you restart your MongoDB, the connection is dropped.

Look at this link: Replication of MongoDB introduction

@iOSDev33
Copy link
Author

Thank you! That was the problem!

@iOSDev33
Copy link
Author

Reopening because still having issues maintaining database connection after setting up a replication set. Heres what I am doing.

Step 1. 3 member replication set up and running
Step 2. Kill the current Primary member
Step 3. Test connectivity and all seems to work.
Step 4. Restart the killed previous Primary member
Step 5. Kill the current Primary member
Step 6. Test connectivity and connection is now lost with Parse Server and requires a reboot.

Here is my sample format of the MongoDB connection URI:
mongodb://test:1234567@mongo0,mongo1,mongo2:27017/sample?replicaSet=sample

Note: using latest version of Parse-Server 2.2.0

@iOSDev33 iOSDev33 reopened this Mar 19, 2016
@flovilmart
Copy link
Contributor

@iOSDev33 does it still occur with 2.2.4?

@drew-gross
Copy link
Contributor

No response in many days, closing.

@kronos
Copy link

kronos commented May 26, 2016

Same problem here. The version of parse-server is 2.2.10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants