supervisord

supervisord: is it possible to redirect subprocess stdout back to supervisord?

偶尔善良 提交于 2019-12-12 16:12:33
问题 I'm using supervisord as the entry point for Docker containers as described in https://docs.docker.com/articles/using_supervisord/, I want all logs to be written to stdout so I can take advantage of builtin tools like docker logs or systemd's journal, especially if running the containers on CoreOS. for stderr there's redirect_stderr=true option for subprocesses, is it possible to redirect the subprocess stdout back to supervisord somehow and not deal with actual log files ? 回答1: You can

Laravel unable to modify queued job code

和自甴很熟 提交于 2019-12-12 10:43:31
问题 When I send a job that fails due to an exception such as 'ErrorException' with message 'Undefined variable: sender' and I fix the code and re-fire the event, the previous code runs again and I get the same error. I have no idea why Laravel re-runs my old code over and over. I'd obviously like to be able to fix the mistakes that are breaking my job execution. I've tried both composer dump-autoload and php artisan queue:flush and those have no effect. Any help? 回答1: You need to run php artisan

How can I keep an Amazon SQS PHP reciever script running forever?

馋奶兔 提交于 2019-12-12 10:08:03
问题 I've previously used Gearman along with supervisor to manage jobs. In this case we are using Amazon SQS which I have spent some time trying to get my head around. I have set up a separate micro instance from our main webserver to use as an Image processing server (purely for testing at the moment, it will be upgraded and become part of a cluster before this implementation goes live) On this micro instance I have installed PHP and ImageMagick in order to perform the image processing. I have

Linux-安装-Supervisor

戏子无情 提交于 2019-12-12 08:48:36
20191115 作者:陈文小超 准备工作 安装依赖 # 安装Supervisor yum install python-setuptools easy_install supervisor 生成配置文件 mkdir /etc/supervisor mkdir /etc/supervisor/supervisord.conf.d echo_supervisord_conf > /etc/supervisor/supervisord.conf 修改配置文件 vim /etc/supervisor/supervisord.conf # include区段修改为(最后一行,注意include前面的分好也要放开) [include] files = /etc/supervisor/supervisord.conf.d/*.conf 编写进程文件 # 在/etc/supervisor/supervisord.conf.d创建 vi /etc/supervisor/supervisord.conf.d/laravel-worker # 添加内容 [program:laravel-worker] # 和文件名保持一致 process_name=%(program_name)s_%(process_num)02d command=/usr/local/php/bin/php /home/app

fig docker monitoring broken container

混江龙づ霸主 提交于 2019-12-12 08:14:05
问题 I have a fig configuration for launch N dockers containers (app, redis, mongo, postgre, etc...) When I run fig up everything is ok. Name Command State Ports -------------------------------------------------------------------------- my_mongodb_1 /usr/local/bin/run Up 28017/tcp, 27017/tcp my_redis_1 /usr/local/bin/run Up 6379/tcp my_pg_1 /usr/local/bin/run Up 5432/tcp my_app_1 ... Up 443->443/tcp, 80->80/tcp but for one not important reason one of this containers could be turned off. Name

Supervisord in Docker + AWS Elastic Beanstalk can't accept non-alphanumeric environment variables

假如想象 提交于 2019-12-12 05:37:25
问题 I am using custom Docker container in AWS Elastic beanstalk to deploy a wep application. I could set environment variables such as API key, API secret, etc.. on AWS web console.(Elastic beanstalk => Configuration => Software Configuration) It worked fine. However, after I changed some variables to other values which contain special characters, it did not work with this error: Docker container quit unexpectedly on Mon Oct 24 13:32:22 UTC 2016: Error: Unexpected end of key/value pairs For help,

Scaling multiple gearman workers

不问归期 提交于 2019-12-12 03:24:11
问题 I created 500 gearman workers on server that have 32 cores and 64GM RAM. The server working well with 60-70% CPU, 22 load avg. i created it with supervisor. What is the best practice for this amount of workers, can you advise to other solution that is not supervisor? what about gearman manager? The worker process a job between 10-100MS - on avg the queue is always 90%. 回答1: Want to update, when i upgrated the version of supervisor to 3.2 its solved my problem. 来源: https://stackoverflow.com

Using configureMonologUsing after Laravel 5.7 upgrade - Supervisor Logging Permission

余生颓废 提交于 2019-12-12 01:13:13
问题 I am trying to upgrade my Laravel 5.5 project to 5.7. I use supervisor and before I was using configureMonologUsing() to generate the logs but apparently with 5.6 upgrade, it got depreciated. My full code in L5.5 was: in bootstrap/app.php: $app->configureMonologUsing( function( Monolog\Logger $monolog) { $processUser = posix_getpwuid( posix_geteuid() ); $processName= $processUser[ 'name' ]; $filename = storage_path( 'logs/laravel-' . php_sapi_name() . '-' . $processName . '.log' ); $handler =

How to run InfluxDB as a foreground process on Docker using Mesos Marathon

て烟熏妆下的殇ゞ 提交于 2019-12-11 20:46:15
问题 OBJ: I want to start a daemon container with Marathon. I want influxdb to be the service running on the container. Using the Docker run command, I currently start the influxdb service in my daemon containers using supervisord. Is there a way of starting the influxDB service in the foreground directly? Is there a way that Marathon can help to achieve this? I really want to avoid using supervisord. I feel it is redundant as a process handler. Thank you! 回答1: You can run the Docker container

Starting Celery with supervisord: AttributeError: 'module' object has no attribute 'celery'

放肆的年华 提交于 2019-12-11 18:00:06
问题 I used to have all my Flask app code and celery code in one file and it worked fine with supervisor. However, it is very hair so I split my tasks to celery_tasks.py and this problem occurs. In my project directory, I can start celery manually with the following command celery -A celery_tasks worker --loglevel=INFO However, because this is a server, I need celery to run as a daemon in background. But it shows following error when I called sudo supervisorctl restart celeryd celeryd: ERROR