故障情况.
1 无法编译通过uwsgi.提示下列信息.
plugins/python/python_plugin.o: In function `uwsgi_python_enable_threads':
> python_plugin.c:(.text+0x74c): undefined reference to `pthread_atfork'
解决方法 注释 947行的代码
//pthread_atfork(uwsgi_python_pthread_prepare, uwsgi_python_pthread_parent, uwsgi_python_pthread_child)
即可通过编译.
2 uwsgi 配置注意事项:
uwsgi.ini
[uwsgi]
uid=admin
#gid=admin
#socket=/home/Trac/xxx/Tracs/Trac.sock
processes=1 // 进程给1.
3 nginx 配置 进程给1
缺陷:
uwsgi无法杀掉.
在我的arm9 1.2G没有VPF设备上运行正常,但是还未应用全面.
4 故障的初期尝试.
用 /opt/bin/gcc -o uwsgi -L/opt/lib utils.o protocol.o socket.o logging.o master.o master_utils.o emperor.o notify.o plugins.o lock.o cache.o queue.o event.o signal.o rpc.o gateway.o loop.o lib/rbtree.o lib/amqp.o rb_timers.o main.o proto/base.o proto/uwsgi.o proto/http.o proto/fastcgi.o lib/linux_ns.o lib/netlink.o async.o ini.o yaml.o snmp.o sendfile.o xmlconf.o spooler.o plugins/python/python_plugin.o plugins/python/pyutils.o plugins/python/pyloader.o plugins/python/wsgi_handlers.o plugins/python/wsgi_headers.o plugins/python/wsgi_subhandler.o plugins/python/gil.o plugins/python/uwsgi_pymodule.o plugins/python/profiler.o plugins/python/symimporter.o plugins/ping/ping_plugin.o plugins/cache/cache.o plugins/nagios/nagios.o plugins/rpc/rpc_plugin.o plugins/fastrouter/fastrouter.o plugins/http/http.o -lpthread -lm -rdynamic -ldl -L/opt/lib -lxml2 -lz -lm -lpthread -ldl -lpthread -lutil -lm -lpython2.6
搜索 ipkg uwsgi atfork 能看到一些解决办法.