[PR #347] [MERGED] fix(server): Gracefully shut down resources #4571

Closed
opened 2026-10-22 04:08:50 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/347
Author: @coxde
Created: 5/1/2026
Status: ✅ Merged
Merged: 5/1/2026
Merged by: @coxde

Base: main ← Head: fix/graceful-shut-down


📝 Commits (4)

  • c72347b fix(server): Gracefully shut down resources
  • c340e6a fix: address comments
  • e293203 fix(server): handle shutdown during startup
  • 99aa986 fix(server): Use shared logger in server entrypoint

📊 Changes

4 files changed (+106 additions, -23 deletions)

View changed files

📝 packages/server/src/app.ts (+10 -1)
📝 packages/server/src/db/connection.ts (+62 -16)
📝 packages/server/src/index.ts (+34 -2)
📝 packages/server/src/routes/sidecar.routes.ts (+0 -4)

📄 Description

Summary by CodeRabbit

  • Bug Fixes
    • More reliable graceful shutdown: database connections are consistently closed across drivers.
    • Background sidecar processes are stopped during shutdown; failures are logged without blocking DB cleanup.
    • Signal-driven shutdown handlers added for SIGTERM/SIGINT with protection against duplicate shutdown attempts.
    • Startup now handles interrupted shutdowns gracefully, avoiding misleading startup failures.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/347 **Author:** [@coxde](https://github.com/coxde) **Created:** 5/1/2026 **Status:** ✅ Merged **Merged:** 5/1/2026 **Merged by:** [@coxde](https://github.com/coxde) **Base:** `main` ← **Head:** `fix/graceful-shut-down` --- ### 📝 Commits (4) - [`c72347b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c72347b412ca77140501f854d9f53cd7194befa1) fix(server): Gracefully shut down resources - [`c340e6a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c340e6a68b1d8d42ef779a264bdaaa4814795f50) fix: address comments - [`e293203`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e293203760d249c344e9806607a221a6b4b088a0) fix(server): handle shutdown during startup - [`99aa986`](https://github.com/Pasta-Devs/Marinara-Engine/commit/99aa986ed3ebcda94387c68a27fd4b45643f8968) fix(server): Use shared logger in server entrypoint ### 📊 Changes **4 files changed** (+106 additions, -23 deletions) <details> <summary>View changed files</summary> 📝 `packages/server/src/app.ts` (+10 -1) 📝 `packages/server/src/db/connection.ts` (+62 -16) 📝 `packages/server/src/index.ts` (+34 -2) 📝 `packages/server/src/routes/sidecar.routes.ts` (+0 -4) </details> ### 📄 Description <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * More reliable graceful shutdown: database connections are consistently closed across drivers. * Background sidecar processes are stopped during shutdown; failures are logged without blocking DB cleanup. * Signal-driven shutdown handlers added for SIGTERM/SIGINT with protection against duplicate shutdown attempts. * Startup now handles interrupted shutdowns gracefully, avoiding misleading startup failures. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:08:50 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#4571
No description provided.