Cannot have more than 1008 concurrent connections

87 views
Skip to first unread message

gabriellia...@gmail.com

unread,
May 4, 2018, 10:38:37 AM5/4/18
to Ratchet
Hello,
some times ago I started experiencing ratchet by creating a project based on the "push integration" example, actually it works how it should but I cannot achieve more than 1008 connections toghether.
I read some other question on this group and I saw that this is a os related problem, I also googled around and tryed to change some settings but I cannot exceed this connections limit. After that connections number is reached I cannot connect more user and if I try to connect another user, autobahn does log nothing.

I launch the ws from the command line from my user: ale (I have root privileges).
I can open 200/250 connection per browser, it depends on the browser.

This is my actual configuration (I edited it matching what I found online)

/etc/pam-d/common-session
ession [default=1]                     pam_permit.so
# here's the fallback if no module succeeds
session requisite                       pam_deny
.so
# prime the stack with a positive return value if there isn't one already;
# this avoids us returning an error just because nothing sets a success code
# since the modules above will each just jump around
session required                        pam_permit
.so
# The pam_umask module will set the umask according to the system default in
# /etc/login.defs and user settings, solving the problem of different
# umask settings with different shells, display managers, remote sessions etc.
# See "man pam_umask".
session optional                        pam_umask
.so
# and here are more per-package modules (the "Additional" block)
session required        pam_unix
.so
session optional        pam_systemd
.so
session required pam_limits
.so

/etc/security/limits.conf
*         hard    nofile      500000
*         soft    nofile      500000
root      hard    nofile      
500000
root      soft    nofile      
500000
apache    hard    nofile      
500000
apache    soft    nofile      
500000
ale       hard    nofile      
500000
ale       soft    nofile      
500000

Do you have some tips to help me about this problem? Thank you

gabriellia...@gmail.com

unread,
May 7, 2018, 5:02:29 AM5/7/18
to Ratchet
-I already followed this article https://easyengine.io/tutorials/linux/increase-open-files-limit/
-I added this lines to the websocket server to find out what was happening:
    $pull->on('error', function ($e) {
        var_dump
($e->getMessage());
   
});
I get no errors, no output, nothing, just the browser say: "firefox cannot establish a connection with the server"

How can I debug the connection process between the client and the websocket?

gabriellia...@gmail.com

unread,
May 7, 2018, 6:06:13 AM5/7/18
to Ratchet

probably this installations solved the problem

$ sudo apt-get install libevent-dev
$ sudo pecl install ev
$ sudo pecl install
event




Reply all
Reply to author
Forward
0 new messages