Database

Introduction

The Quobis Communication platform uses a MongoDB database to store the information. The official documentation can be found here https://docs.mongodb.com/manual/.

Connection policy

The connection with the MongoDB database is handled by a library shared between all the services in the platform, so all of the uses the same mechanisms to connect, reconnect and disconnect from the database. In case that the connection with MongoDB doesn’t work, the following error is logged:

[error] No connection with MongoDB. Check its URI or status (attempt: 1);

The library has a reconnection mechanism that tries to connect up to 30 times at a rate of one per second. These values match the defaults in MongoDB driver and cannot be configured. The same mechanism is executed not only at start time but also in case of a disconnection. In case that the connection is not successful after these attempts, the following error is logged and no further connection attempts are made:

[error] Failed to reach MongoDB: reconnection retries exhausted (30). Please fix the error and retry.