[erlang-questions] Cowboy back pressure

Alexander Petrovsky <>
Tue Nov 4 13:21:41 CET 2014


Until recently, I thought that I can do "connection" back pressure from
cowboy like:

NbAcceptors = 256,
> Backlog = 256,
> MaxConnections = 256,

cowboy:start_http(http, NbAcceptors, [{port, ...}, {backlog, Backlog},
> {max_connections, MaxConnections}], [{env, ...}]),

But some times ago I'm observed that I can't, the
"ranch_server:count_connections/1" says that active ranch connection was
gather than 256.
While the "ss -lt" show me that ranch socket backlog is 256. And I can't
understand why?

- Does the "ranch_server:count_connections/1" show not only active
connections in ESTABLISHED state, but and the TIME_WAIT state?
- How can I properly do connection back pressure with ranch and cowboy?

Петровский Александр / Alexander Petrovsky,

Skype: askjuise
Phone: +7 914 8 820 815
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20141104/64772f13/attachment.html>

More information about the erlang-questions mailing list