OroCommerce Forums

Covering OroCommerce topics, including community updates and company announcements.

Forums Forums OroCommerce lots of process for message queue …

This topic contains 10 replies, has 3 voices, and was last updated by  saqibbhat96 6 years, 11 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #31677

    yannick.simon
    Participant

    Hello

    Orocommerce 1.10, ubuntu 16, php 7

    i have lots of process oro:message-queue:consume
    and many logs that show problem with them

    many lines with

    and some processes are :

    my crontab contains

    What is the problem please ?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Author
    Replies
  • #31678

    yannick.simon
    Participant

    sorry, i just realized that i should not add a cron line for this oro:message-queue:consume

    Should i put this command into a supervisord daemon ?

    #31679

    wgozdzicki
    Participant

    Hello Simon,
    On production environment you should use Supervisord because it relaunch consumer every time when it dies. On development environment it’s convenient to use it. Also when you need more then one consumer you need Supervisord. You can find information about that here: https://www.orocrm.com/documentation/current/book/installation#activating-background-tasks and https://github.com/orocrm/platform/tree/master/src/Oro/Bundle/MessageQueueBundle#supervisord

    Best regards

    #31680

    yannick.simon
    Participant

    thank you wgozdzicki

    #31681

    saqibbhat96
    Participant

    Hello Simon, could you please share how to achieve supervisord configuration for message queuing. that would be helpful….
    thanks

    #31682

    yannick.simon
    Participant

    Ok, no problem

    my server is “ubuntu 16.04”

    i have a directory /srv/orocommerce/orocommerce-application/
    owned by orocommerce:orocommerce

    installation of supervisord

    i created this conf into /etc/supervisord/conf.d/orocommerce.conf

    then, when i restart supervisord, i can see 4 processes

    #31683

    saqibbhat96
    Participant

    Hello Simon, thanks a lot for sharing the configuration and now it works, but my only concern is im able to see only one process

    And regarding the cron jobs, you think this would be good to go cron jobs setup

    And yeah i more important question. do i have to run supervisor as root?

    Could you please see the matter.
    Thanks

    #31684

    yannick.simon
    Participant

    saquibbhat96

    i copied and paste the conf file from
    https://github.com/orocrm/platform/tree/master/src/Oro/Bundle/MessageQueueBundle#supervisord

    where the “numprocs=4” parameters seems to indicate that it must be run 4 times
    and the “user=orocommerce” is the parameter i chose to run orocommerce on my server

    i think only one oro:oro:message-queue:consume is ok,
    but, i did not want to change anything from the config given on
    https://github.com/orocrm/platform/tree/master/src/Oro/Bundle/MessageQueueBundle#supervisord

    finally, you must have :
    1 line in your crontab in order to run app/console oro:cron each minute
    1 supervisor conf file in order to run at least 1 app/console oro:message-queue:consume continually (it will restart if crashed or finish, thanks to supervisor)

    I think that you should not run any command as root for orocommerce,
    when, i installed supervisor, and created the supervisor conf file : i was logged as root, only for that.

    #31685

    saqibbhat96
    Participant

    Hello Simon,
    the supervisor is working fine thanks to you.
    But regarding the setup of Cron jobs, i tried to write in

    Adding a line

    But when i save the file, and check the

    output “no crontab set for this user”, and the line goes missing from the crontab -e

    please assit, is there any other way of setting up cron jobs?

    #31686

    yannick.simon
    Participant

    saqibbhat96

    the reason is that each user owns a specific crontab

    when you enter

    with this command you change root’s crontab

    after that, you enter

    with this command you list your current user’s crontab

    my advice is to remove the line you entered with “sudo crontab -e”

    and to add the same line with “crontab -e”
    (without sudo)

    #31687

    saqibbhat96
    Participant

    thanks Simon, cron is working fine.

    Best Wishes

Viewing 10 replies - 1 through 10 (of 10 total)

The forum ‘OroCommerce’ is closed to new topics and replies.

Back to top