http client pipeline

Wilson Tam wilson.sh.tam@REDACTED
Wed Jun 15 08:18:53 CEST 2005


Hi,

I recently updated the inets from 4.0.1 to 4.4. The http client's  
request pipeline function seems not working. I may miss some setting.  
Can anyone help?

Here is what happened, I tried to run a command from the prompt:

3> http:request(get, {"http://192.168.0.207", []}, [], []).
{ok,{{"HTTP/1.1",200,"OK"},
      [{"connection","Keep-Alive"},
       {"date","Wed, 15 Jun 2005 05:56:58 GMT"},
       {"server",
        "Apache/1.3.31 (Unix) PHP/4.3.10 mod_ssl/2.8.19 OpenSSL/ 
0.9.7d"},
       {"content-length","936"},
       {"content-type","text/html"},
       {"x-powered-by","PHP/4.3.10"},
       {"keep-alive","timeout=15, max=100"}],....

Everything is ok. And I repeat the same command again.

4> http:request(get, {"http://192.168.0.207", []}, [], []).
{ok,{{"HTTP/1.1",200,"OK"},
      [{"connection","Keep-Alive"},
       {"date","Wed, 15 Jun 2005 05:58:35 GMT"},
       {"server",
        "Apache/1.3.31 (Unix) PHP/4.3.10 mod_ssl/2.8.19 OpenSSL/ 
0.9.7d"},
       {"content-length","936"},
       {"content-type","text/html"},
       {"x-powered-by","PHP/4.3.10"},
       {"keep-alive","timeout=15, max=100"}],...

the result is also ok. But what happen is, on my apache log, it says:

18536 [2005-06-15 13:56:58] 192.168.0.171 [192.168.0.207] "GET / HTTP/ 
1.1" 200 480 - - -
18545 [2005-06-15 13:58:35] 192.168.0.171 [192.168.0.207] "GET / HTTP/ 
1.1" 200 480 - - -

which says that they are connected to two different processes. And I  
keep repeating it, every time it create a new connection.

The manual says the pipeline_timeout is set to zero by default. I  
tried to set it to 60sec

21> http:set_options([{pipeline_timeout, 60000}]).
ok

still, there is no different. All requests still make new connection.

After that, I ran tcpdump to see who disconnect the connection. It  
shows that the client send a FIN packet. I'm not sure why the client  
will send the FIN.

How can I make it to do pipeline as in 4.0.1?Can anyone help?


Thanks,
Willie




More information about the erlang-questions mailing list