overleaf/overleaf · error
mongo health check failed, error present
Error message
mongo health check failed, error present
What it means
Dedicated Mongo health endpoint: the callback-style getUserEmail query returned a non-null err, so the Mongo driver itself failed (connection, timeout, or query error). Unlike the 'no email' variant, this indicates a transport/query-level failure rather than missing data.
Source
Thrown at services/web/app/src/Features/HealthCheck/HealthCheckController.mjs:69
},
checkRedis(req, res, next) {
return rclient.healthCheck(function (error) {
if (error != null) {
logger.err({ err: error }, 'failed redis health check')
return res.sendStatus(500)
} else {
return res.sendStatus(200)
}
})
},
checkMongo(req, res, next) {
return UserGetter.getUserEmail(
settings.smokeTest.userId,
function (err, email) {
if (err != null) {
logger.err({ err }, 'mongo health check failed, error present')
return res.sendStatus(500)
} else if (email == null) {
logger.err(
{ err },
'mongo health check failed, no emai present in find result'
)
return res.sendStatus(500)
} else {
return res.sendStatus(200)
}
}
)
},
}
View on GitHub (pinned to 28ad3b03b7)
Solutions
- Check Mongo connection strings and replica set health
- Look at the logged err for the specific driver error (e.g. MongoNetworkError, MongoTimeoutError)
- Scale or tune connection pool sizes if the health check times out under load
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at services/web/app/src/Features/HealthCheck/HealthCheckController.mjs:69 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of overleaf/overleaf@28ad3b03b7 (2026-09-03).
Data as JSON: /api/errors/9e1852762df69dc5.
Report an issue: GitHub.