-
Notifications
You must be signed in to change notification settings - Fork 94
Description
Looks like there is no way to set neither number of acceptors acceptor_pool_size nor max number of connections max nor backlog backlog for webmachine. Entire configuration is hardcoded in the OPTIONS macros.
https://github.com/basho/riak_cs/blob/2.1.1/src/riak_cs_sup.erl?ts=2#L67
https://github.com/basho/riak_cs/blob/2.1.1/src/riak_cs_sup.erl?ts=2#L35-L40
https://github.com/basho/riak_cs/blob/2.1.1/src/riak_cs_sup.erl?ts=2#L186
https://github.com/webmachine/webmachine/blob/1.10.0/src/webmachine_mochiweb.erl#L33
By default, mochiweb uses 16 acceptors and limits maximum number of connections to 2048. It's falling behind of capabilities of our servers and causing a bottleneck.
-record(mochiweb_socket_server,
{port,
loop,
name=undefined,
%% NOTE: This is currently ignored.
max=2048,
ip=any,
listen=null,
nodelay=false,
backlog=128,
active_sockets=0,
acceptor_pool_size=16,
ssl=false,
ssl_opts=[{ssl_imp, new}],
acceptor_pool=sets:new(),
profile_fun=undefined}).https://github.com/basho/mochiweb/blob/1.5.1p4/src/mochiweb_socket_server.erl#L22-L28