-
Notifications
You must be signed in to change notification settings - Fork 325
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix race condition on seeding database on startup. Improve startup logs.
If nginx got started before MongoDB/Mora was fully responsive, there was a possibility seeding the initial database data would fail. This improves the seeding process by waiting for MongoDB to be fully up before proceeding with the seeding. Seeding will be re-attempted until it succeeds. Some related improvements were made to the similar Elasticsearch setup process. We were already waiting there to ensure Elasticsearch was up before running setup, but if Elasticsearch timed out, then setup wasn't re-attempted for another 1 hour. This improves things so that setup is reattempted on startup until it succeeds. This also quiets the startup logs by only logging events when MongoDB or Elasticsearch aren't ready after the 60 second timeout period (rather than on each connection attempt).
- Loading branch information
Showing
3 changed files
with
64 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters