Menu Close
    Hire us Request quote Reading list Switch to dark mode

    Process control in Akeneo

    Akeneo is Product information management system which is a very effective tool to manage Multilingual, multi-currency and large no. of products in the single or multi-channel environment.

    Import and export in Akeneo are done via Jobs. These jobs run in the background and perform import/export/calculation.  Process control manages background process for these jobs.
    Without process control system or any other alternative, jobs will always show Status Starting … and they will never start.


    Process control system like supervisor is the solution for this.

    Process control with supervisor

    Supervisor is most commonly used and recommended process control for Akeneo.

    how to setup?

    1. Install supervisor by running the commands

    apt update
    apt install supervisor

    2. setup supervisor configuration by editing file /etc/supervisor/conf.d/conf.conf by running the command

    sudo nano /etc/supervisor/conf.d/conf.conf

    then Insert following data in the file and save

    [program:akeneo_queue_daemon]
    command=/path/to/php /path/to/your/pim/bin/console akeneo:batch:job-queue-consumer-daemon --env=prod
    autostart=true
    autorestart=true
    stderr_logfile=/var/log/akeneo_daemon.err.log
    stdout_logfile=/var/log/akeneo_daemon.out.log
    user=my_user
    stopasgroup=true

    Note:

    1. you must create  stderr_logfile (akeneo_daemon.err.log) and stdout_logfile (akeneo_daemon.out.log) at mentioned path.
    2. modify my_user with username of user that runs php fpm

    Now run commands

    sudo supervisorctl reread
    sudo supervisorctl update
    sudo supervisorctl start akeneo_queue_daemon
    

    After that jobs will get the start.

    Process Control with Monit

    Monit is another process control system. Monit is the possible replacement of supervisor. It is a common choice with docker. It has some interesting features like manage boot order, dependencies, max retry count, timeout etc other than obvious process monitoring.

    how to setup? (for: ubuntu, debian, mint)

    1. install monit by running the command
      sudo apt-get install monit
    2. Setup monit configurations by editing file  /etc/monit/monitrc by running the command
      sudo nano /etc/monit/monitrc

      set up the access server, username, password etc

       set httpd port 2812 and
      use address localhost  # only accept connection from localhost
      allow localhost        # allow localhost to connect to the server and
      allow admin:monit      # require user 'admin' with password 'monit'
      allow @monit           # allow users of group 'monit' to connect (rw)
      allow @users readonly  # allow users of group 'users' to connect readonly
      
      
    3. add akeneo daemon in config by editing file /etc/monit/conf.d/akeneo_queue_daemon
      check process akeneo_queue_daemon with pidfile /var/run/akeneo_queue_daemon.pid
       start program = “/path/to/php /path/to/your/pim/bin/console akeneo:batch:job-queue-consumer-daemon --env=prod”
    4. reload monit service and start akeneo queue daemon
      sudo /etc/init.d/monit start
      sudo monit start akeneo_queue_daemon

     

    The user may also use other process controls system like systemd.
    But above-listed process control systems are popular ones and supervisor is generally used in Akeneo.

    . . .

    Comment

    Add Your Comment

    Be the first to comment.

    Back to Top
    css.php
    Hire Us!
    Brief us about your requirements and we'll get back to you.
    Woo! Hooy!
    We have just received your message and our expert will get back to you shortly.
    Send Again
    Close