connection error in webrick server

C

Cedric Rosario

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.

Thanks.
 
R

Robert Klemme

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? ...

Kind regards

robert
 
C

cedric so

Robert said:
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? ...

Kind regards

robert

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.

Thanks.

cedric
 
R

Robert Klemme

2008/10/27 cedric so said:
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...

Cheers

robert
 
C

cedric so

Robert said:
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.

Thanks.

cedric
 
R

Robert Klemme

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.

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,197
Messages
2,571,040
Members
47,634
Latest member
RonnyBoelk

Latest Threads

Top