Skip to content

[Bug]: API server does not gracefully shut down on termination #480

Open

Description

@yash27git

Problem

The API HTTP server is started in a goroutine, but shutdown needs to explicitly stop and wait for the listener before telemetry and shared database resources are cleaned up. Unexpected server failures must also produce a non-zero exit without bypassing deferred cleanup.

Expected behavior

  • On a termination signal, stop accepting new HTTP requests and allow in-flight requests to finish within a bounded deadline.
  • Force-close remaining connections if graceful shutdown times out, and report shutdown/close errors.
  • Drain telemetry after the HTTP server has stopped.
  • On an unexpected serve failure, clean up resources and exit non-zero.

This issue tracks the behavior addressed by PR #476.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions