babywd 发表于 2014-05-29 17:00

求教一个uwsgi异常退出的问题

   自己用django和highcharts做了一个动态绘图的东东,highcharts每2秒会从一个json接口读取数据。现在是每隔几个小时uwsgi会自己退出,求大神啊。日志为:

172.19.17.16 () {44 vars in 940 bytes} GET /cmdb/static/js/jquery.uniform.min.js?_=1401346400086 => generated 8308 bytes in 1 msecs (HTTP/1.1 200) 3 header
s in 118 bytes (1 switches on core 0)
172.19.17.16 () {44 vars in 942 bytes} GET /cmdb/static/js/jquery.validate.min.js?_=1401346400099 => generated 21933 bytes in 1 msecs (HTTP/1.1 200) 3 head
ers in 119 bytes (1 switches on core 0)
172.19.17.16 () {44 vars in 910 bytes} GET /cmdb/static/js/app.js?_=1401346400117 => generated 33072 bytes in 1 msecs (HTTP/1.1 200) 3 headers in 119 bytes
(1 switches on core 0)

F*CK !!! i must kill myself (pid: 2344 app_id: 0)...
*** if you want your workers to be automatically respawned consider enabling the uWSGI master process ***
*** Starting uWSGI 2.0.4 (64bit) on ***
compiled with version: 4.4.7 20120313 (Red Hat 4.4.7-3) on 28 May 2014 12:21:32
os: Linux-2.6.32-279.el6.x86_64 #1 SMP Fri Jun 22 12:19:21 UTC 2012
nodename: cmdb-24.youth.cn
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 8
current working directory: /home/cmdbms/src
detected binary path: /usr/bin/uwsgi
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
*** WARNING: you are running uWSGI without its master process manager ***
your processes number limit is 65536
your memory page size is 4096 bytes
*** WARNING: you have enabled harakiri without post buffering. Slow upload could be rejected on post-unbuffered webservers ***
detected max file descriptor number: 65536
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to TCP address 127.0.0.1:3031 fd 3
Python version: 2.6.6 (r266:84292, Feb 22 2013, 00:00:18)
*** Python threads support is disabled. You can enable it with --enable-threads ***
Python main interpreter initialized at 0x1b53a90
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 404192 bytes (394 KB) for 4 cores
*** Operational MODE: preforking ***
added ../ to pythonpath.
WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x1b53a90 pid: 3996 (default app)
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI worker 1 (pid: 3996, cores: 1)
spawned uWSGI worker 2 (pid: 3997, cores: 1)
spawned uWSGI worker 3 (pid: 3998, cores: 1)
spawned uWSGI worker 4 (pid: 3999, cores: 1)

timespace 发表于 2014-05-29 18:32

F*CK !!! i must kill myself (pid: 2344 app_id: 0)...
*** if you want your workers to be automatically respawned consider enabling the uWSGI master process ***
如果这是uWSGI输出的日志,那么已经说明问题了,请启用uWSGI master process!!!
为了释放资源,worker处理一定数量的请求,就会自动退出,没有master,worker不能重启啊,查下文档,应该有生产环境配置的注意事项,最好杜绝日志中所有的WARNING。
页: [1]
查看完整版本: 求教一个uwsgi异常退出的问题