I did a simple server in ruby using webrick as shown in the
tutorial. My problem is that when I tested it with several
client connection, a number of connections were refused. I
can’t find the reason why this happens, even though the default
maximum concurrent client is set to 100. I only made 50 concurrent
connections but more than 10 connections are often refused. Can
anyone explain the reason for this.
I also tried changing the default value to a higher value but to no
avail.
I did a simple server in ruby using webrick as shown in the
tutorial. My problem is that when I tested it with several
client connection, a number of connections were refused. I
can’t find the reason why this happens, even though the default
maximum concurrent client is set to 100. I only made 50 concurrent
connections but more than 10 connections are often refused. Can
anyone explain the reason for this.
I also tried changing the default value to a higher value but to no
avail.
What error message did you see? Are there firewalls in between? Did
you use hostname for the server URL and can this name be resolved on all
hosts? …
Hm… Is the hosting system a Windows non server version? That could
play a role as well. Or, your Webrick dies for some reason and hence
you cannot connect any more. There are so many options where network
communication can go wrong…
Cheers
robert
I tested it both on a Windows non-server and server versions but the
results
were the same. The Webrick does not die because it still accepts
connections
whenever I run the my test program. My only problem is that it doesn’t
accept
all the connections.
This was the error message…
Errno::ECONNREFUSED: Connection refused - “connect(2)”
There are no firewalls set, and I am only using a single computer for
this.
I used the ip address instead of the hostname.
Hm… Is the hosting system a Windows non server version? That could
play a role as well. Or, your Webrick dies for some reason and hence
you cannot connect any more. There are so many options where network
communication can go wrong…
whenever I run the my test program. My only problem is that it doesn’t
accept
all the connections.
Did you check connection state with netstat? It may be that socket
resources are not released fast enough. I’m not a network admin but it
may be that you can remedy this with a changed timeout setting.
Kind regards
robert
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.