gunicorn启动无限工人

时间:2014-08-18 09:35:00

标签: python flask gunicorn

我有一个烧瓶应用程序在gunicorn 0.17.2后面运行。重新安装依赖项后(但版本没有变化),gunicorn已经开始启动无限制的工作程序 - 或者更可能的是,它们正在启动,死亡和重新启动(但是没有报告错误)。这种行为可能是什么原因?

root@d7a9b49aef07:~# gunicorn --debug  --log-level debug --workers=2 myapp.wsgi:app
2014-08-18 09:28:16 [572] [DEBUG] Current configuration:
2014-08-18 09:28:16 [572] [DEBUG]   daemon: False
2014-08-18 09:28:16 [572] [DEBUG]   check_config: False
2014-08-18 09:28:16 [572] [DEBUG]   graceful_timeout: 30
2014-08-18 09:28:16 [572] [DEBUG]   proxy_protocol: False
2014-08-18 09:28:16 [572] [DEBUG]   proxy_allow_ips: ['127.0.0.1']
2014-08-18 09:28:16 [572] [DEBUG]   post_fork: <function post_fork at 0x7f5b532467d0>
2014-08-18 09:28:16 [572] [DEBUG]   pre_request: <function pre_request at 0x7f5b53246aa0>
2014-08-18 09:28:16 [572] [DEBUG]   certfile: None
2014-08-18 09:28:16 [572] [DEBUG]   logger_class: simple
2014-08-18 09:28:16 [572] [DEBUG]   group: 0
2014-08-18 09:28:16 [572] [DEBUG]   tmp_upload_dir: None
2014-08-18 09:28:16 [572] [DEBUG]   default_proc_name: myapp.wsgi:app
2014-08-18 09:28:16 [572] [DEBUG]   syslog_facility: user
2014-08-18 09:28:16 [572] [DEBUG]   keyfile: None
2014-08-18 09:28:16 [572] [DEBUG]   limit_request_fields: 100
2014-08-18 09:28:16 [572] [DEBUG]   limit_request_field_size: 8190
2014-08-18 09:28:16 [572] [DEBUG]   django_settings: None
2014-08-18 09:28:16 [572] [DEBUG]   worker_class: sync
2014-08-18 09:28:16 [572] [DEBUG]   backlog: 2048
2014-08-18 09:28:16 [572] [DEBUG]   when_ready: <function when_ready at 0x7f5b53246500>
2014-08-18 09:28:16 [572] [DEBUG]   pre_fork: <function pre_fork at 0x7f5b53246668>
2014-08-18 09:28:16 [572] [DEBUG]   pre_exec: <function pre_exec at 0x7f5b53246938>
2014-08-18 09:28:16 [572] [DEBUG]   user: 0
2014-08-18 09:28:16 [572] [DEBUG]   secure_scheme_headers: {'X-FORWARDED-PROTO': 'https', 'X-FORWARDED-PROTOCOL': 'ssl', 'X-FORWARDED-SSL': 'on'}
2014-08-18 09:28:16 [572] [DEBUG]   pythonpath: None
2014-08-18 09:28:16 [572] [DEBUG]   debug: True
2014-08-18 09:28:16 [572] [DEBUG]   worker_connections: 1000
2014-08-18 09:28:16 [572] [DEBUG]   keepalive: 2
2014-08-18 09:28:16 [572] [DEBUG]   logconfig: None
2014-08-18 09:28:16 [572] [DEBUG]   config: None
2014-08-18 09:28:16 [572] [DEBUG]   on_starting: <function on_starting at 0x7f5b53246230>
2014-08-18 09:28:16 [572] [DEBUG]   on_reload: <function on_reload at 0x7f5b53246398>
2014-08-18 09:28:16 [572] [DEBUG]   post_request: <function post_request at 0x7f5b53246b90>
2014-08-18 09:28:16 [572] [DEBUG]   spew: False
2014-08-18 09:28:16 [572] [DEBUG]   loglevel: debug
2014-08-18 09:28:16 [572] [DEBUG]   pidfile: None
2014-08-18 09:28:16 [572] [DEBUG]   umask: 0
2014-08-18 09:28:16 [572] [DEBUG]   x_forwarded_for_header: X-FORWARDED-FOR
2014-08-18 09:28:16 [572] [DEBUG]   accesslog: None
2014-08-18 09:28:16 [572] [DEBUG]   access_log_format: "%(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s"
2014-08-18 09:28:16 [572] [DEBUG]   syslog_addr: udp://localhost:514
2014-08-18 09:28:16 [572] [DEBUG]   syslog: False
2014-08-18 09:28:16 [572] [DEBUG]   proc_name: None
2014-08-18 09:28:16 [572] [DEBUG]   worker_exit: <function worker_exit at 0x7f5b53246cf8>
2014-08-18 09:28:16 [572] [DEBUG]   bind: ['127.0.0.1:8000']
2014-08-18 09:28:16 [572] [DEBUG]   preload_app: False
2014-08-18 09:28:16 [572] [DEBUG]   max_requests: 0
2014-08-18 09:28:16 [572] [DEBUG]   errorlog: -
2014-08-18 09:28:16 [572] [DEBUG]   timeout: 30
2014-08-18 09:28:16 [572] [DEBUG]   syslog_prefix: None
2014-08-18 09:28:16 [572] [DEBUG]   workers: 2
2014-08-18 09:28:16 [572] [DEBUG]   nworkers_changed: <function nworkers_changed at 0x7f5b53246e60>
2014-08-18 09:28:16 [572] [DEBUG]   forwarded_allow_ips: ['127.0.0.1']
2014-08-18 09:28:16 [572] [DEBUG]   limit_request_line: 4094
2014-08-18 09:28:16 [572] [INFO] Starting gunicorn 0.17.2
2014-08-18 09:28:16 [572] [DEBUG] Arbiter booted
2014-08-18 09:28:16 [572] [INFO] Listening at: http://127.0.0.1:8000 (572)
2014-08-18 09:28:16 [572] [INFO] Using worker: sync
2014-08-18 09:28:16 [577] [INFO] Booting worker with pid: 577
2014-08-18 09:28:16 [578] [INFO] Booting worker with pid: 578
2014-08-18 09:28:16 [579] [INFO] Booting worker with pid: 579
2014-08-18 09:28:16 [580] [INFO] Booting worker with pid: 580
2014-08-18 09:28:16 [581] [INFO] Booting worker with pid: 581
2014-08-18 09:28:16 [582] [INFO] Booting worker with pid: 582
2014-08-18 09:28:16 [583] [INFO] Booting worker with pid: 583
2014-08-18 09:28:16 [584] [INFO] Booting worker with pid: 584
2014-08-18 09:28:17 [585] [INFO] Booting worker with pid: 585
2014-08-18 09:28:17 [586] [INFO] Booting worker with pid: 586
2014-08-18 09:28:17 [587] [INFO] Booting worker with pid: 587
2014-08-18 09:28:17 [588] [INFO] Booting worker with pid: 588
2014-08-18 09:28:17 [590] [INFO] Booting worker with pid: 590
2014-08-18 09:28:17 [591] [INFO] Booting worker with pid: 591
2014-08-18 09:28:17 [592] [INFO] Booting worker with pid: 592
2014-08-18 09:28:17 [593] [INFO] Booting worker with pid: 593
2014-08-18 09:28:17 [594] [INFO] Booting worker with pid: 594
2014-08-18 09:28:17 [595] [INFO] Booting worker with pid: 595
2014-08-18 09:28:17 [596] [INFO] Booting worker with pid: 596
2014-08-18 09:28:17 [597] [INFO] Booting worker with pid: 597
2014-08-18 09:28:17 [598] [INFO] Booting worker with pid: 598
2014-08-18 09:28:17 [599] [INFO] Booting worker with pid: 599
2014-08-18 09:28:17 [600] [INFO] Booting worker with pid: 600
2014-08-18 09:28:17 [601] [INFO] Booting worker with pid: 601
2014-08-18 09:28:17 [602] [INFO] Booting worker with pid: 602
2014-08-18 09:28:17 [603] [INFO] Booting worker with pid: 603
2014-08-18 09:28:17 [604] [INFO] Booting worker with pid: 604
.... etc

1 个答案:

答案 0 :(得分:1)

应用程序在Docker容器中运行,Python解释器在特定主机上运行时导致分段错误。所以,更多的是Docker问题而不是枪支问题。