ops: /api/v1/health does not check MongoDB or Redis
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- express, javascript, mongodb, node.js, redis
- Domain
- backend, observability
Research direction
Start at the /api/v1/health route and check the Render health check configuration, MongoDB connection setup, Redis client, and graceful shutdown handling. Readiness should ping MongoDB and Redis with short timeouts, report Redis as degraded when unavailable, and return 503 for MongoDB failure or shutdown; verify the existing liveness route remains cheap.
Written by the indexing model from the issue text.
Description
GET /api/v1/health always answers { success: true, message: "StudyNotion server is running." }, even when MongoDB or Redis is unreachable. Render's health check and the uptime pings therefore report the service as healthy while requests fail.
Suggested fix
- Keep a cheap liveness route, and add a readiness route that runs
mongoose.connection.db.admin().ping()(and a RedisPING) with short timeouts, returning 503 when MongoDB is down and reporting Redis asdegradedbecause the app can run without it. - Point Render's health check path at the readiness route, and flip it to 503 at the start of graceful shutdown so in-flight requests drain.
Found while reviewing StudyNotion with Claude Code.
- Dominant language
- JavaScript
- Stars
- 23
- Forks
- 8
- Avg merge
- 11m
- Merged PRs (30d)
- 4
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from khemssharma/StudyNotion
-
docs: README is missing the sections its introduction promises; outdated clone URL and Node versionOpendocumentation
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
khemssharma/StudyNotion#55 ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 35/100
khemssharma/StudyNotion#59 ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 45/100
khemssharma/StudyNotion#58 ·
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 38/100
khemssharma/StudyNotion#57 ·
-
documentation
Difficulty 4/5 3-5 days Newbie friendliness 48/100
khemssharma/StudyNotion#54 ·
All issues in khemssharma/StudyNotion
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
OWASP/CheatSheetSeries#3018 ·
Maintainers usually reply within 1 day
-
Radix number block generates NaN after switching a negative or decimal number to binary, octal or hexPossibly taken @matthewalberto claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
mit-cml/appinventor-sources#4246 · 1 comment ·
Maintainers usually reply within 1 day
-
marketing
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 83/100
GoogleChrome/modern-web-guidance-src#3675 · 2 comments ·
Maintainers usually reply within 1 day