Hello All,
I have a written a proxy server, using HTTP::Proxy, and it has been working fine for 1-10 clients without any problems. I opened the testing up to more clients (upwards of 80), and the program runs fine for a little while and eventually shuts down without any more than the following message:

PROCESS: Too many child process, serving the connection

I am running the script on a linux system, and have HTTP::Proxy setup in the following way:
sub StartServer_tcp_incoming_handler{ use HTTP::Proxy; use HTTP::Proxy::HeaderFilter::simple; use Digest::SHA1 qw(sha1_hex); my $port = 30000; my $proxy = HTTP::Proxy->new( host => $Server_IP, max_clients => 80, min_spare_servers => 10, max_keep_alive_requests => 1, port => $Server_Port ); my $filter = HTTP::Proxy::HeaderFilter::simple->new( sub { my ($self, $headers, $request) = @_; my $uri = $request->uri(); ......... ......... ...etc...
Can I force the TCP connection to be closed after each connection? I think too many open TCP connections are being left open.

Any help is greatly appreciated
Thanks.

In reply to PROCESS: Too many child process, serving the connection by r1n0

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.