Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • hgitaly hgitaly
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 39
    • Issues 39
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • heptapod
  • hgitalyhgitaly
  • Issues
  • #34
Closed
Open
Created Dec 06, 2020 by Georges Racinet@gracinet🦑Owner

Server: catch SIGTERM and SIGINT to terminate nicely

Now that the server is multiprocessed comes the question of the termination of worker processes upon signal received by the main process.

  • SIGINT: the main process quits (with the KeyboardInterrupt exception), the worker process are unaffected and end up adopted.
  • SIGTERM: ignored by the main process.
  • SIGKILL (for the record): the main process dies immediately, the worker process are unaffected and adopted.

Noticed because I had hundreds or HGitaly worker processes after some intense and parallel runs of the Rails app tests, as these launch a dedicated HGitaly server and terminate it with SIGKILL (soon will be changed of course to SIGTERM).

Side note: if a worker process receives SIGTERM, it terminates with error.SignalInterrupt, thanks to catchterm() in mercurial.dispatch.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking