Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow setting HTTP acceptors number, connections limit and backlog #1341

Open
manifest opened this issue Aug 6, 2017 · 0 comments
Open

Allow setting HTTP acceptors number, connections limit and backlog #1341

manifest opened this issue Aug 6, 2017 · 0 comments

Comments

@manifest
Copy link

manifest commented Aug 6, 2017

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

@manifest manifest changed the title Allow setting HTTP acceptors number and connections limit Allow setting HTTP acceptors number, connections limit and backlog Aug 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant