S
S
Space2015-06-21 02:12:05
Yii
Space, 2015-06-21 02:12:05

How to start supervisor on YII2?

Unable to launch.

[program:gearman] 
command=php /var/www/admin/www/my.com/jobs TestJob.php
numprocs=1 
directory=/root/sandbox
stdout_logfile=/var/log/worker.log
environment=GEARMAN_USER=gearman 
autostart=true
autorestart=true
user=gearman
stopsignal=KILL

Nothing is written to the logs, I can’t understand what user means (where to get it from)? Why directory?
Job file is /var/www/admin/www/my.com/jobs TestJob.php

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
matperez, 2015-06-21
@ruslite

Maybe this will help supervisord.org/configuration.html#program-x-secti...
"If supervisord runs as root, this UNIX user account will be used as the account which runs the program. If supervisord can't switch to the specified user, the program will not be started."
Also set stderr_logfile=/a/path to see the contents of the error stream.
Well, check that your worker starts successfully by itself, without a supervisor.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question