logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: 500 Can't connect to localhost:80 (connect: timeout)
Author
myrmidia



Joined: 25 Feb 2009
Posts: 1

PostPosted: Wed 25 Feb '09 11:02    Post subject: 500 Can't connect to localhost:80 (connect: timeout) Reply with quote

Hi everybody,

I just installed the latest release of the Apache software on my desktop (XP SP2) and I wrote a little program (stress test) with Perl.
In fact, this programm call in an infinite loop the 'stress' function...

Regulary, I have the error 500 with this message :
500 Can't connect to localhost:80 (connect: timeout)

This is the content of the function :
Code:
sub stress {
    my $ua = LWP::UserAgent->new;
    $ua->timeout(5);
    my $response = $ua->get('http://localhost');
    if (!$response->is_success) {
        print Dumper($response->status_line);
    }
}


I'm very surprised because I thought that the Apache Web Server was able to take lof of incoming connections per second.

Is there a way to configure with the http.conf file or recompilation from source to avoid this error ???
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7407
Location: EU, Germany, Next to Hamburg

PostPosted: Wed 25 Feb '09 14:53    Post subject: Reply with quote

I'm not used to perl. Do you run the test from the command line or inside apache with mod perl?
maybe a useful topic http://www.apachelounge.com/viewtopic.php?t=531
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Wed 25 Feb '09 18:19    Post subject: Reply with quote

With only a 5 second sleep between loops I wonder if the WinXP 20 connection limit is being hit.
Back to top


Reply to topic   Topic: 500 Can't connect to localhost:80 (connect: timeout) View previous topic :: View next topic
Post new topic   Forum Index -> Apache