[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

connection error in webrick server

Cedric Rosario

10/27/2008 6:07:00 AM

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.
--
Posted via http://www.ruby-....

10 Answers

Robert Klemme

10/27/2008 6:30:00 AM

0

On 27.10.2008 07:06, Cedric Rosario wrote:
> 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

Cedric Rosario

10/27/2008 7:03:00 AM

0

Robert Klemme wrote:
>
> 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
--
Posted via http://www.ruby-....

Robert Klemme

10/27/2008 8:25:00 AM

0

2008/10/27 cedric so <xeddr@yahoo.com>:
> Robert Klemme wrote:
>>
>> 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.

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

--
remember.guy do |as, often| as.you_can - without end

Cedric Rosario

10/27/2008 10:23:00 PM

0

Robert Klemme wrote:
>
> 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
--
Posted via http://www.ruby-....

Robert Klemme

10/28/2008 6:37:00 AM

0

On 27.10.2008 23:22, cedric so wrote:
> Robert Klemme wrote:
>> 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...
>
> 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

Nevus

12/20/2010 9:58:00 PM

0

Wow,

Lots of anger here for a potentially nice film that someone went to a
lot of trouble, time and expense to make for others enjoyment. It's
easy to judge something that one doesn't have a lot of knowledge
about. I'm not suggesting they be held in awe, just appreciated. I'm
ordering for sure.

Bill

12/21/2010 1:29:00 AM

0

I want to hear some reviews in 2011. Please post those of you that can
review the product.

Thanks

Nevus

12/29/2010 1:07:00 AM

0

Pinball Collector arrived today!

Mike D

12/29/2010 1:22:00 AM

0

Cool. Just ordered my copy as well.

Mike

Pinlover

12/31/2010 1:09:00 PM

0

Thanks for the heads up !
just placed my order also
:)