Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

Latest commit

 

History

History
38 lines (30 loc) · 1.08 KB

production_settings.md

File metadata and controls

38 lines (30 loc) · 1.08 KB
layout parent title nav_order
default
Symfony bundle
Production settings
10

{% include support.md %}

Production settings

Supervisord

As you may read in quick tour you have to run enqueue:consume in order to process messages The php process is not designed to work for a long time. So it has to quit periodically. Or, the command may exit because of error or exception. Something has to bring it back and continue message consumption. We advise you to use Supervisord for that. It starts processes and keep an eye on them while they are working.

Here an example of supervisord configuration. It runs four instances of enqueue:consume command.

[program:pf_message_consumer]
command=/path/to/bin/console --env=prod --no-debug --time-limit="now + 5 minutes" enqueue:consume
process_name=%(program_name)s_%(process_num)02d
numprocs=4
autostart=true
autorestart=true
startsecs=0
user=apache
redirect_stderr=true

Note: Pay attention to --time-limit it tells the command to exit after 5 minutes.

back to index