[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: blockwrite: send: Broken pipe.



I ran the http_url_get_raw version tonight a full 1000 times without problems (all those dsply op codes took a long time!). I think previously I've run something similar against yahoo.com and got many thousands without error.

But using the persistent code, something happens. Did you run the code I sent against one of your web pages? Does it continue to work all 1000?

I ran against a smaller page on a different apache server and got 102 before an error. But the error this time was:
recvresp(): end with err

Debugging the blockwrite tonight, I see that it appears to be called twice per invocation. The first time it is called with GET... (length 74) and the second with 0D0A.
It is the 0D0A that causes the error on the seventh time through. I am not sure how to look further at this point. 

I can't debug send() so I don't really know what happened this time through.

________________________________________
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Scott Klement [sk@xxxxxxxxxxxxxxxx]
Sent: Wednesday, May 28, 2014 7:55 PM
To: HTTPAPI and FTPAPI Projects
Subject: Re: blockwrite: send: Broken pipe.

Possibly the server is cutting you off?

On 5/28/2014 6:05 PM, Mike Krebs wrote:
>     Playing with Peter's idea for checking the performance of HTTPAPI, I
>     tried the program below and got the error blockwrite: send: Broken
>     pipe.
>
>
>     Very consistently, I got it on the seventh time I tried to download our
>     intranet's homepage. It is a fairly big page. Did I do something wrong
>     or did I find a bug?
>
>
>     HTTPAPI Ver 1.25beta2 released 2012-03-06
>
>     OS/400 Ver V7R1M0
>
>     ...
>
>     2014-05-28-17.51.12.664000 chunk size = 16000
>
>     2014-05-28-17.51.12.664000 get_chunk_size returned 16000
>
>     2014-05-28-17.51.12.664000 calling comm_blockread
>
>     ...
>
>     2014-05-28-17.51.14.179000 chunk size = 9910
>
>     2014-05-28-17.51.14.179000 get_chunk_size returned 9910
>
>     2014-05-28-17.51.14.179000 calling comm_blockread
>
>     ...
>
>     2014-05-28-17.51.14.966000 chunk size = 3239
>
>     2014-05-28-17.51.14.966000 get_chunk_size returned 3239
>
>     2014-05-28-17.51.14.967000 calling comm_blockread
>
>     ...
>
>     2014-05-28-17.51.15.210000 chunk size = 34
>
>     2014-05-28-17.51.15.210000 get_chunk_size returned 34
>
>     2014-05-28-17.51.15.210000 calling comm_blockread
>
>     ...
>
>     2014-05-28-17.51.15.394000 chunk size = 2843
>
>     2014-05-28-17.51.15.394000 get_chunk_size returned 2843
>
>     2014-05-28-17.51.15.394000 calling comm_blockread
>
>     ...
>
>     2014-05-28-17.51.15.577000 chunk size = 1760
>
>     2014-05-28-17.51.15.577000 get_chunk_size returned 1760
>
>     2014-05-28-17.51.15.577000 calling comm_blockread
>
>     ...
>
>     2014-05-28-17.51.15.765000 chunk size = 0
>
>     2014-05-28-17.51.15.765000 get_chunk_size returned 0
>
>     2014-05-28-17.51.15.765000 http_persist_get(): entered        ç=
>     starting over
>
>     2014-05-28-17.51.15.765000 http_persist_req(GET) entered.
>
>     ... end of sixth/start seventh time
>
>     2014-05-28-17.51.25.475000 chunk size = 0
>
>     2014-05-28-17.51.25.475000 get_chunk_size returned 0
>
>     2014-05-28-17.51.25.475000 http_persist_get(): entered
>
>     2014-05-28-17.51.25.475000 http_persist_req(GET) entered.
>
>     2014-05-28-17.51.25.475000 http_long_ParseURL(): entered
>
>     2014-05-28-17.51.25.475000 do_oper(GET): entered
>
>     2014-05-28-17.51.25.475000 There are 0 cookies in the cache
>
>     GET / HTTP/1.1
>
>     Host: www3.milwaukeevalve.com
>
>     User-Agent: http-api/1.24
>
>
>
>     2014-05-28-17.51.25.476000 SetError() #55: blockwrite: send: Broken
>     pipe.
>
>
>     ***********************************************
>
>
>     H DFTACTGRP(*NO) BNDDIR('HTTPAPI')
>
>
>      /copy qrpglesrc,httpapi_h
>
>
>     D comm            s               *
>
>     D rci             s             10I 0
>
>     D msg             s             52A
>
>     D URL             S            300A    varying
>
>     D timechar        S             15A
>
>     D x               S             10i 0
>
>
>      /free
>
>           http_debug(*on);
>
>           url = 'http://www3.milwaukeevalve.com';
>
>           timechar = %char(%time());
>
>           dsply timechar;
>
>           comm = http_persist_open( url );
>
>           if comm = *null;
>
>              http_crash();
>
>           endif;
>
>           timechar = %char(%time());
>
>           dsply timechar;
>
>           for x = 1 to 1000;
>
>              rci = http_persist_get( comm: url: 0: %paddr( toString ));
>
>              if rci <> 1;
>
>                http_crash();
>
>               // handle error
>
>              endif;
>
>           endfor;
>
>
>           timechar = %char(%time());
>
>           dsply timechar;
>
>           http_persist_close(comm);
>
>           *inlr = *on;
>
>      /end-free
>
>     p toString        b
>
>     d toString        pi            10i 0
>
>     D   fd                          10i 0 value
>
>     D   Data                      8192a   options(*varsize)
>
>     D   len                         10i 0 value
>
>      /free
>
>         dsply %char(len);
>
>         return len;
>
>      /end-free
>
>     p toString        e
>
>
>
> -----------------------------------------------------------------------
> This is the FTPAPI mailing list.  To unsubscribe, please go to:
> http://www.scottklement.com/mailman/listinfo/ftpapi
> -----------------------------------------------------------------------

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------