In order to run internal EAC process, some services need to be created with systemd
Server status
This service must be install on all servers. It retrives memory and cpu usage in order to determine what will be the best server to launch a task.
Copy /var/www/html/current/deployment/systemd/eac-server-status.service file into /etc/systemd/system/ with the following command
sudo cp /var/www/html/current/deployment/systemd/eac-server-status.service /etc/systemd/system/
Edit the file and change ExecStart parameter in order to specify the full path to php according to your installation.
ExecStart=/usr/bin/php /var/www/html/current/bin/console eac:server-status --every=3
You can change option « every« . This value must be set between 1 to 10 (seconds to save memory usage and cpu on database).
Assignment server
This service determines the best servers available for tasks with status « SEND TO QUEUE ». It must be installed only on the main server.
Copy /var/www/html/current/deployment/systemd/eac-execution-assign-server.service file into /etc/systemd/system/ with the following command
sudo cp /var/www/html/current/deployment/systemd/eac-execution-assign-server.service /etc/systemd/system/
Edit the file and change ExecStart parameter in order to specify the full path to php according to your installation.
ExecStart=/usr/bin/php /var/www/html/current/bin/console eac:execution-assign-server --nextSecondsToAssign=90 --pastSecondsToAssign=60 --frequence=10
You can change options:
- nextSecondsToAssign: assign server to tasks which will executed in the next 90 seconds
- pastSecondsToAssign: assign server to tasks sent to queue and the start date is in the past of 60 seconds
- frequence: to this action all 10 seconds
Consume task
This services consumes / execute the task with status « SEND TO QUEUE ». It must be installed on all execution servers.
Copy /var/www/html/current/deployment/systemd/eac-consume.service file into /etc/systemd/system/ with the following command
sudo cp /var/www/html/current/deployment/systemd/eac-consume.service /etc/systemd/system/
Edit the file and change ExecStart parameter in order to specify the full path to php according to your installation.
ExecStart=/usr/bin/php /var/www/html/current/bin/console eac:consume --launchForTheNextInSeconds=0 --launchForThePastInSeconds=60
You can change options:
- launchForTheNextInSeconds: execute tasks exactly on time : at 0 second. You can change to 1 if you prefer to execute task one second before
- launchForThePastInSeconds: execute tasks sent to queue and the start date is in the past of 60 seconds
