On 4 August 2010 07:04, Johan de Bruin <johan.debruin@cellfind.co.za> wrote:
I have a "http" "proxy" in yaws that uses ibrowse to forward the request


   RESPONSE = case  {DoPost,string:to_lower(string:sub_string(URL, 1, 5))}
of
      {false,"https"} -> ibrowse:send_req(URL ++ "?" ++ QUERY,[], get ,
[],[{is_ssl,true},{ssl_options,[]}]);
      {false,"http:"} -> ibrowse:send_req(URL ++ "?" ++ QUERY,[], get);
      {true,"http:"} -> ibrowse:send_req(URL,[{"Content-Type",

"application/x-www-form-urlencoded"}],
                                             post,QUERY);
      {true,"https"} -> ibrowse:send_req(URL,[{"Content-Type",

"application/x-www-form-urlencoded"}],

post,QUERY,[{is_ssl,true},{ssl_options,[]}])
    end,


If I forward the request to another erlany yawsserver on a laptop it runs @
80 to 130 tps without any problems.
However if I forward the requests to a php page via apache that just 3 small
if's and eco part of the request.
I get this error at +- 15tps

{error,{'EXIT',{normal,  {gen_server,
call,[<0.21939.1>,{send_req,{{url,"http://domain/ussdfake.php?msisdn=2782030
4143&sessionid=918737119&phase=1&type=3&request=0&networkid=1\
",\"domain\",
80,undefined,       undefined,
\"/ussdfake.php?msisdn=27820304143&sessionid=918737119&phase=1&type=3&reques
t=0&networkid=1\",       http},
     [],[],[],      30000}},    30100]}}}}"



Can you please repeat the test with ibrowse tracing turned on and post the traces please? I suspect this is caused by the remote server abnormally closing the connection, but ibrowse should handle this more gracefully. Either ibrowse traces, or a packet capture would be nice.

cheers
Chandru