Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

100% CPU utilization #581

Closed
captnbp opened this issue Feb 16, 2015 · 11 comments
Closed

100% CPU utilization #581

captnbp opened this issue Feb 16, 2015 · 11 comments
Labels

Comments

@captnbp
Copy link

captnbp commented Feb 16, 2015

Hi,

When launching supervisord (last Github version), it seems to work fine, but the supervisord process uses 100% of my CPU without getting lower.

I have a RedHat 6.5, with Python 3.4.

@mnaberez
Copy link
Member

Does it behave differently on the latest stable release version (3.1.3)? Can you give us some way to reproduce it (e.g. sample config file, specific steps to follow)?

@captnbp
Copy link
Author

captnbp commented Feb 17, 2015

Hi,

I can't test 3.1.3 as I have Python 3.4, not Python 2.7.

For the config files I have this first one :

file=/data/hyperic/tmp/supervisor.sock   ; (the path to the socket file)
chmod=0700                 ; socket file mode (default 0700)

[supervisord]
logfile=/data/hyperic/var/log/supervisord.log ; (main log file;default $CWD/supervisord.log)
logfile_maxbytes=50MB        ; (max main logfile bytes b4 rotation;default 50MB)
logfile_backups=10           ; (num of main logfile rotation backups;default 10)
loglevel=info                ; (log level;default info; others: debug,warn,trace)
pidfile=/data/hyperic/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
nodaemon=false               ; (start in foreground if true;default false)
minfds=1024                  ; (min. avail startup file descriptors;default 1024)
minprocs=200                 ; (min. avail process descriptors;default 200)
childlogdir=/data/hyperic/var/log            ; ('AUTO' child log dir, default $TEMP)

[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

[supervisorctl]
serverurl=unix:///data/hyperic/tmp/supervisor.sock ; use a unix:// URL  for a unix socket

[include]
files = /data/hyperic/etc/supervisord/*.ini

If I don't provide any .ini file, so nothing to start the CPU is fine. If I provide one or several like this one, the CPU is fully loaded by the supervisord process only. All my services (Nginx, PHP-FPM, uWSGI are working fine) :

command=nginx
numprocs=1                    ; number of processes copies to start (def 1)
autostart=true                ; start at supervisord start (default: true)
autorestart=unexpected        ; whether/when to restart (default: unexpected)
startsecs=5                   ; number of secs prog must stay running (def. 1)
startretries=3                ; max # of serial start failures (default 3)
exitcodes=0,2                 ; 'expected' exit codes for process (default 0,2)
stdout_logfile=%(ENV_SVCMOUNT)s/var/log/nginx/nginx.log
stdout_logfile_maxbytes=10MB   ; max # logfile bytes b4 rotation (default 50MB)
stdout_logfile_backups=10     ; # of stdout logfile backups (default 10)
stderr_logfile=%(ENV_SVCMOUNT)s/var/log/nginx/nginx_error.log
stderr_logfile_maxbytes=10MB   ; max # logfile bytes b4 rotation (default 50MB)
stderr_logfile_backups=10     ; # of stderr logfile backups (default 10)

Here are my logs :

2015-02-17 14:32:05,147 WARN Included extra file "/data/hyperic/etc/supervisord/php-fpm.ini" during parsing
2015-02-17 14:32:05,161 INFO RPC interface 'supervisor' initialized
2015-02-17 14:32:05,161 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2015-02-17 14:32:05,162 INFO daemonizing the supervisord process
2015-02-17 14:32:05,163 INFO supervisord started with pid 10435
2015-02-17 14:32:06,167 INFO spawned: 'php-fpm' with pid 10436
2015-02-17 14:32:16,165 INFO success: php-fpm entered RUNNING state, process has stayed up for > than 10 seconds (startsecs)
2015-02-17 14:32:24,889 INFO waiting for php-fpm to die
2015-02-17 14:32:24,892 INFO stopped: php-fpm (exit status 0)

@mnaberez
Copy link
Member

I can't test 3.1.3 as I have Python 3.4, not Python 2.7.

The latest stable version (3.1.3) works on Python 2.5 - 2.7 if one of those is an option. Python 3 support has not been released yet. We appreciate you testing it and will try to look into this issue, but please keep the README.rst disclaimer in mind, it's probably not a good idea to run it in production yet.

@captnbp
Copy link
Author

captnbp commented Feb 18, 2015

I'm aware of the disclamer, no problem for me, production is for end of 2015 on my side, so I have time to test and help you debugging. I only use it for Test purpose. I'll install a sandbox with Python 2.7 and reproduce the same context to see how Supervisor behaves.

@auvipy
Copy link

auvipy commented Mar 1, 2015

i also have plan to use supervisor with python 3.4x on ubuntu test production server

@mnaberez
Copy link
Member

mnaberez commented Mar 5, 2015

This should be fixed by #589.

@mnaberez mnaberez closed this as completed Mar 5, 2015
@msabramo
Copy link
Contributor

msabramo commented Mar 6, 2015

@captnbp: Did this solve your problem?

@captnbp
Copy link
Author

captnbp commented Mar 6, 2015

Yes perfect ! No more CPU overhead. Thanks a lot !

Benoît Pourre
Tel: (+33)6 81 36 78 92

2015-03-06 5:04 GMT+01:00 Marc Abramowitz notifications@github.com:

@captnbp https://github.com/captnbp: Did this solve your problem?


Reply to this email directly or view it on GitHub
#581 (comment)
.

@RyanBalfanz
Copy link

I'm seeing this now on a Mac, installed via Homebrew, but only after enabling the web UI like so:

[inet_http_server]         ; inet (TCP) server disabled by default
port=127.0.0.1:9001        ; (ip_address:port specifier, *:port for all iface)
➜  ~ brew info supervisor
supervisor: stable 3.3.1 (bottled)
Process Control System
http://supervisord.org/
/usr/local/Cellar/supervisor/3.3.1 (587 files, 7.4M) *
  Poured from bottle on 2016-08-09 at 23:31:13
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/supervisor.rb
==> Caveats
To have launchd start supervisor now and restart at login:
  brew services start supervisor
Or, if you don't want/need a background service you can just run:
  supervisord -c /usr/local/etc/supervisord.ini
2016-08-09 23:50:50,876 INFO supervisord started with pid 4382
2016-08-09 23:51:27,008 WARN received SIGTERM indicating exit request
2016-08-09 23:51:27,234 INFO Increased RLIMIT_NOFILE limit to 1024
2016-08-09 23:51:27,245 INFO RPC interface 'supervisor' initialized
2016-08-09 23:51:27,245 CRIT Server 'inet_http_server' running without any HTTP authentication checking
2016-08-09 23:51:27,245 INFO RPC interface 'supervisor' initialized
2016-08-09 23:51:27,245 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2016-08-09 23:51:27,246 INFO supervisord started with pid 4487

@nicolastobo
Copy link

I have the same issue than @RyanBalfanz , installed via brew on MacOs

$ brew info supervisor                                                                                                                                                                                                          
supervisor: stable 3.3.1 (bottled)
Process Control System
http://supervisord.org/
/usr/local/Cellar/supervisor/3.3.1 (592 files, 7.6M) *
  Poured from bottle on 2016-11-03 at 11:42:18
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/supervisor.rb
==> Caveats
To have launchd start supervisor now and restart at login:
  brew services start supervisor
Or, if you don't want/need a background service you can just run:
  supervisord -c /usr/local/etc/supervisord.ini

@hehongbo
Copy link

experienced same thing like @RyanBalfanz @nicolastobo .
macOS Sierra 10.11.2, installed supervisor via easy_install
Activity Monitor report high CPU Usage of Python process when i open Web UI(:9001)
restart supervisord will make it come back normal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

7 participants