Quantcast

Server load tests on Linux

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Server load tests on Linux

Alessandro Sivieri
Hi all,

I'm trying to perform some load tests on a Web server, so I have created a
little script performing parallel connections to the server and getting the
responses, all this using httpc, but when this number gets large this
message starts to pop out:

=ERROR REPORT==== 9-Dec-2010::18:30:14 ===
HTTPC-MANAGER<httpc_manager> handler (<0.297.0>) successfully started for
unknown request #Ref<0.0.0.651> => canceling

Is there a limit in the number httpc is able to treat? Or maybe I have to
change something in my OS (Ubuntu 10.10)?

--
Sivieri Alessandro
[hidden email]
http://www.chimera-bellerofonte.eu/
http://www.poul.org/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Server load tests on Linux

Dan Kelley
On Thu, Dec 9, 2010 at 12:34 PM, Alessandro Sivieri <
[hidden email]> wrote:

> Hi all,
>
> I'm trying to perform some load tests on a Web server, so I have created a
> little script performing parallel connections to the server and getting the
> responses, all this using httpc, but when this number gets large this
> message starts to pop out:
>
> =ERROR REPORT==== 9-Dec-2010::18:30:14 ===
> HTTPC-MANAGER<httpc_manager> handler (<0.297.0>) successfully started for
> unknown request #Ref<0.0.0.651> => canceling
>
>
I ran into what sounds like the same thing a while back, see here:

http://groups.google.com/group/erlang-programming/browse_thread/thread/ef41c4f044521ee0/eb1dab49ee589d54?lnk=gst&q=kelley#eb1dab49ee589d54

I ended up switching to ibrowse.  After doing that, I was able to get many
more simultaneous connections before hitting a bug in that software.
 (Supposedly that bug has been fixed by the maintainer in the latest
version, but I haven't had the opportunity to re-test.)

Dan
Zvi
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Server load tests on Linux

Zvi
In reply to this post by Alessandro Sivieri
Just try something like this (spawn a process per HTTP request):

http_get(Path, IP, Port) ->
    case gen_tcp:connect(IP, Port, [binary]) of
        {ok, Sock} ->
            HttpReq = iolist_to_binary(io_lib:format("GET ~s\r\n"
                                                        "Host: ~s\r\n"
                                                        "\r\n",
                                                        [Path, IP])),
            ok = gen_tcp:send(Sock, HttpReq),
            do_recv(Sock),
            case (catch gen_tcp:close(Sock)) of
                {'EXIT',_} -> error;
                _ -> ok
            end,

        {error, Reason} ->
            io:format("Error ~p connecting outbound socket: ~s:~b~n",
[Reason,IP,Port])
    end.

do_recv(Sock)->
    case gen_tcp:recv(Sock, 0) of
        {ok, Data} ->
            io:format("Recvd ~s~n", [Data]);
        {error, closed} ->
            closed;
        _Other ->
            io:format("Other ~p~n", [_Other])
    end.

Zvi

On Dec 9, 7:34 pm, Alessandro Sivieri <[hidden email]>
wrote:

> Hi all,
>
> I'm trying to perform some load tests on a Web server, so I have created a
> little script performing parallel connections to the server and getting the
> responses, all this using httpc, but when this number gets large this
> message starts to pop out:
>
> =ERROR REPORT==== 9-Dec-2010::18:30:14 ===
> HTTPC-MANAGER<httpc_manager> handler (<0.297.0>) successfully started for
> unknown request #Ref<0.0.0.651> => canceling
>
> Is there a limit in the number httpc is able to treat? Or maybe I have to
> change something in my OS (Ubuntu 10.10)?
>
> --
> Sivieri Alessandro
> [hidden email]://www.chimera-bellerofonte.eu/http://www.poul.org/

________________________________________________________________
erlang-questions (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:[hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Server load tests on Linux

Alessandro Sivieri
Thanks for the answers; I'm using Tsung for now, it seems a very good tool.

--
Sivieri Alessandro
[hidden email]
http://www.chimera-bellerofonte.eu/
http://www.poul.org/
Zvi
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Server load tests on Linux

Zvi
I used tsung to test ejabberd, but didn't figured out how to use it
for long-lived HTTP comet connections.

On Dec 12, 8:34 pm, Alessandro Sivieri <[hidden email]>
wrote:
> Thanks for the answers; I'm using Tsung for now, it seems a very good tool.
>
> --
> Sivieri Alessandro
> [hidden email]://www.chimera-bellerofonte.eu/http://www.poul.org/

________________________________________________________________
erlang-questions (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:[hidden email]

Loading...