Job queue daemon in Akeneo image

Setting up the job queue daemon in Akeneo

Hi 
Will your jobs always display the status 'Starting...' without ever actually starting?
Starting...
Select an Image
Make sure you have setup the queue daemon and daemon service is running. 

There are some causes if job showing Starting ...

  • Deamon service (supervisor) is not installed and configured for Akeneo.
  • Daemon service is not setup correctly.
  • Daemon service (supervisor) is not running. Check the service and start if you have already setup the supervisor for queue.
  • Some jobs are running and your job is in a queue, so check if any job is running from the Activity -> Process tracker

How to setup the daemon service (supervisor) over Ubuntu?

Install the supervisor service using the following commands.
sudo apt update
sudo apt install supervisor
After successfully installing the supervisor, you need to configure your akeneo jobs 
create a file in the configuration directory of supervisor /etc/supervisor/conf.d/akeneo.conf
add the following to the created configuration file (akeneo.conf).
[program:akeneo_queue_daemon]
command=/usr/bin/php /srv/pim/bin/console messenger:consume ui_job import_export_job data_maintenance_job --env=prod -vv
autostart=false
autorestart=true
stderr_logfile=/var/log/akeneo_daemon.err.log
stdout_logfile=/var/log/akeneo_daemon.out.log
user=www-data
In the above command, you need to replace the following if changed.
/usr/bin/php with your php 
/srv/pim with your akeneo directory path
www-data with PHP-FPM / apache user
also create the log files using commands
sudo touch /var/log/akeneo_daemon.err.log
sudo touch /var/log/akeneo_daemon.out.log
Then run the following commands to make the change on the effect on supervisors.
sudo supervisorctl reread
sudo supervisorctl update

Launch the daemon

supervisorctl start akeneo_queue_daemon
After then, you can check what job is running currently with supervisor configuration using command.
sudo supervisorctl fg akeneo_queue_daemon
You can create multiple job consumers to run the jobs in the same time it will directly effect on your CPU uses.
Back to blog