我们正在尝试使用mongodb集合配置uWSGI皇帝和工作人员。
以下是该集合的外观:
{
"_id" : ObjectId("533de5c835a024e0578d6675"),
"harakiri-verbose" : true,
"limit-post" : 65536,
"stats" : "/path/to/file.socket",
"log-slow" : true,
"ts" : ISODate("2014-04-03T22:50:35.464Z"),
"buffer-size" : 65535,
"post-buffering" : 1048576,
"master" : true,
"show-config" : true,
"env" : "LANG:en_US.UTF-8",
"config" : "junx_1",
"pidfile" : "/path/to/file.pid",
"listen" : 100,
"auto-procname" : true,
"vassal_id" : "1",
"harakiri" : 7200,
"vacuum" : true,
"no-orphans" : true,
"name" : "appname",
"processes" : 4,
"procname-prefix-spaced" : "app_worker",
"socket" : "xx.xxx.xxx.xxx:0",
"plugin" : "php",
"enabled" : 1,
"reload-on-rss" : 300,
"binary-path" : "/home/uwsgi/uwsgi",
"subscribe2" : "server:xx.xxx.xxx.xxx:1010,key:xx.xxx.xxx.xxx,modifier1:14,sign:SHA1:/home/uwsgi_keys/private.pem",
"max-requests" : 10000,
"daemonize" : "/var/log/uwsgi/app.log"
}
这是emperor命令输出:
/uwsgi --emperor mongodb://127.0.0.1:27017,emperor.vassals,{enabled:1} --plugin emperor_mongodb --show-config
;uWSGI instance configuration
[uwsgi]
emperor = mongodb://127.0.0.1:27017,emperor.vassals,{enabled:1}
plugin = emperor_mongodb
show-config = true
;end of configuration
*** Starting uWSGI 2.0.3 (64bit) on [Fri Apr 4 01:17:51 2014] ***
compiled with version: 4.6.3 on 03 April 2014 23:53:12
os: Linux-3.10.23-xxxx-std-ipv6-64 #1 SMP Tue Mar 18 14:48:24 CET 2014
nodename: {nodename}
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 40
current working directory: /home/uwsgi
detected binary path: /home/uwsgi/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 2063402
your memory page size is 4096 bytes
detected max file descriptor number: 1024
[emperor] enabled emperor MongoDB monitor for 127.0.0.1:27017 on collection emperor.vassals
*** starting uWSGI Emperor ***
皇帝使用mongo集合正常工作,使用{"enabled": 1}
查询所有文档但是没有工作人员启动。
任何帮助都将受到高度赞赏!
答案 0 :(得分:0)
<强>解决方案强>
我们通过为collection.name
提供有效的extension
来解决了这个问题:emperor.vassals.name = appname
=&gt; emperor.vassals.name = appname.json