Needs advice
on
RabbitMQRabbitMQSupervisordSupervisord
and
SymfonySymfony

Hello, I'm using Supervisord for separate process manager/consumer with RabbitMQ and Symfony but it's not working properly, it disconnects after a couple of hours.. and for a workaround, I'm using a restart job on Jenkins (as in the linked issue in GitHub) but tbh I would like to have a clean stack.. if anyone knows a better alternative than supervisord it will be awesome..

Many thanks!

READ LESS
Process stops processing messages after certain amount of time · Issue #28 · ricbra/rabbitmq-cli-consumer · GitHub (github.com)
10 upvotes·27.4K views
Replies (2)

I've had good experiences moving from Supervisord to using systemd for managing processes, especially for setups involving RabbitMQ and Symfony. Systemd not only integrates well with the system, offering better control and management, but it also simplifies logging through journalctl and handles automatic restarts seamlessly.

Here's what I did to make the switch: - Craft a Service File: I wrote a .service file in /etc/systemd/system/ to describe my service. It includes details on how to start and stop the process, among other things. - Set Up Service Behavior: Inside this file, I specified commands like ExecStart for launching my process, Restart to ensure it always restarts after failure, and set the User to define which user runs the process. - Enable and Launch the Service: With systemctl enable my-service.service, I made sure my service would start on boot, and systemctl start my-service.service got it running right away. - Manage and Log: Whenever I needed to check on things, journalctl was there for logs, and systemctl helped me manage the service (like checking its status or restarting it). - Switching to systemd resolved the disconnection issues I faced without needing any workarounds like restartingI've had good experiences moving from Supervisord to using systemd for managing processes, especially for setups involving RabbitMQ and Symfony. Systemd not only integrates well with the system, offering better control and management, but it also simplifies logging through journalctl and handles automatic restarts seamlessly.

Here's what I did to make the switch: - Craft a Service File: I wrote a .service file in /etc/systemd/system/ to describe my service. It includes details on how to start and stop the process, among other things. - Set Up Service Behavior: Inside this file, I specified commands like ExecStart for launching my process, Restart to ensure it always restarts after failure, and set the User to define which user runs the process. - Enable and Launch the Service: With systemctl enable my-service.service, I made sure my service would start on boot, and systemctl start my-service.service got it running right away. - Manage and Log: Whenever I needed to check on things, journalctl was there for logs, and systemctl helped me manage the service (like checking its status or restarting it). - Switching to systemd resolved the disconnection issues I faced without needing any workarounds like restart jobs. It felt like a cleaner, more reliable approach.

READ MORE
6 upvotes·1 comment·7K views
mwlazlo885
mwlazlo885
·
February 16th 2024 at 6:56PM

Many thanks for the recommendation! I will give it a try, thanks : )

·
Reply
Avatar of mwlazlo885