authentik icon indicating copy to clipboard operation
authentik copied to clipboard

Gunicorn throws error upon handling SIGINT

Open PKizzle opened this issue 2 years ago • 3 comments

Describe the bug When sending a SIGINT to the authentik server gunicorn throws an error.

To Reproduce Steps to reproduce the behavior:

  1. Start a shell inside an authentik Docker image
  2. Run dumb-init -- /lifecycle/ak server and wait for the startup to finish successfully
  3. Send a SIGINT to the process i.e. by using the keyboard (CTRL+c)
  4. See error

Expected behavior The process should exit without throwing an error.

Logs

{"event": "Handling signal: int", "level": "info", "logger": "gunicorn.error", "timestamp": 1697581130.2154722}
{"event": "Error while closing socket [Errno 9] Bad file descriptor", "level": "info", "logger": "gunicorn.error", "timestamp": 1697581130.2611558}
{"event": "Error while closing socket [Errno 9] Bad file descriptor", "level": "info", "logger": "gunicorn.error", "timestamp": 1697581130.261223}
{"event": "Worker exiting (pid: 39)", "level": "info", "logger": "gunicorn.error", "timestamp": 1697581130.3631873}
{"event": "Worker exiting (pid: 38)", "level": "info", "logger": "gunicorn.error", "timestamp": 1697581130.3642566}
{"event": "Shutting down: Master", "level": "info", "logger": "gunicorn.error", "timestamp": 1697581130.9277878}

Version and Deployment (please complete the following information):

  • authentik version: 2023.8.3
  • Deployment: helm

Additional context This might be related to https://github.com/benoitc/gunicorn/issues/1877 however this issue should have already been fixed in the version that authentik is currently using.

PKizzle avatar Oct 17 '23 22:10 PKizzle

The issue seems to persist even in recent versions: https://github.com/benoitc/gunicorn/issues/3013

PKizzle avatar Dec 03 '23 15:12 PKizzle

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

There is now a draft PR for the aforementioned issue in the gunicorn repo: https://github.com/benoitc/gunicorn/pull/3127/files

PKizzle avatar Feb 05 '24 17:02 PKizzle

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Still waiting for PR to leave draft status...

PKizzle avatar Apr 08 '24 23:04 PKizzle