Hello.

I have a multithreaded application, that user 3rd party API (Amazon Glacier actually). It uploads data in several streams, using POST/PUT requests and LWP::UserAgent.

Problem is that if I have many concurrent uploads (which flood a network), I am getting HTTP 408.

1) HTTP 408 comes from server, it's not internal response of LWP::UserAgent - I see server headers, which LWP can't reproduce.

2) If I use computer with higher bandwidth available, I can have more concurrent threads without 408

3) Other users of my software experience that too

4) Other users of this API experience that too. (they use different implementation, I know one Java and one is Python)

Thus I consider that:

a) it's not server side limit for connections per IP.

b) it's server side setup, probably with socket timeout set, global for Amazon Glacier API.

What I wan't to do:

I wan't somehow optimize LWP::UserAgent setup to handle this situation more graceful.

For example I found that it flushes buffers not optimal way:

http://www.nntp.perl.org/group/perl.libwww/2005/12/msg6481.html

Can someone advice something ? What is more important here to avoid 408 server timeouts ?

I can consider using something other, than LWP, even own socket HTTP implementation.


In reply to LWP client, socket, timeout on server side. by vsespb

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.