Skip to content

Graceful shutdown of Symfony Messenger Consumer when started via RR systemd #1880

Answered by rustatian
jelovac asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @jelovac 👋

  1. Do not use -d option with RR. This option starts a debug/profiling server, which slows down execution significantly.
  2. There is an option: timeout_stop_sec, you may specify it (should not be less than the overall graceful timeout: link). RR, before stopping the process, sending SIGINT into it. So, you may catch this signal inside your worker, process all requests and exit from the process. By setting the proper timeout, you can specify the time which you're allowed to spend finishing already received requests.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jelovac
Comment options

Answer selected by rustatian
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
P-service Plugin: service
2 participants