override lazy val mainDb: DB = {
val connection = driver1.connection(inject[List[String]](identified by 'MongoDBServers), MongoConnectionOptions())
connection(inject[String](identified by 'MainMongoDatabase))
}
First any possible issue is logged as WARN, rather than DEBUG which must only be considered to debug an already confirmed issue.
Then, I think there is a misunderstanding. The MongoConnection of ReactiveMongo doesn't represent a network connection, but a pool managing several physical/network connections ( http://reactivemongo.org/releases/0.11/documentation/tutorial/connect-database.html ).
From there, I don't see anything in the DEBUG message that could lead to think there is an issue.
Best regards
- The mentioned code is using the MongoConnection.apply function, which is being deprecated , and should be replaced by the new database(..) function (which returns a Future of DefaultDB).
- The DB reference is assigned to a val, doing so if this ref is erroneous due to resolution issue (e.g. network issue), it will never be recovered as eval'ed only once (even more true with the new resolution).