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

blockwrite: send: Broken pipe.



   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
-----------------------------------------------------------------------