Error in http client

Corrado Santoro csanto@REDACTED
Thu May 26 19:20:58 CEST 2005


Corrado Santoro wrote:
> Ingela Anderton wrote:
> > Both 
> > 
> > http:request(get, {"http://www.google.com", []}, [], []).
> > 
> > and
> > 
> > http:request(get, {"http://www.google.se", []}, [], []).
> > 
> > works fine for me on the latest version, that is inets-4.4.1. However I do
> > not think this version made it to open source yet!
> Well, if I issue the call from the Erlang shell, it works. So I think 
> the problem is with the integration with my program. For this purpose, 
> I'm spawining several Erlang processes each one making its own 
> 'http:request' call. Is it a problem for the http module? I mean, is 
> 'http:request' process-safe?
No that is not a problem for the http-client! If you have only one
processes making asynchronous http-requests or many processes making
synchronous request will not make a difference. Of course to be able
to handle the pipelining concept all request have to go through the
manager process which will spawn a request handling process for each
request unless it is pipelined and then handled by a previously
spawned process. In the current implementation there is no
user profiles which could make the manager process a little of a
bottleneck. (When you have user profiles you would get one manager per
profile). The code however is written to be easy to extend with
user profiles and that is a thing we most probably will add in future
release of inets.

I am not a 100 % sure but I think that your problem could be related
to a pipeline bug that we fixed just recently. The bug manifested
itself by returning {error, session_remotly_closed} for a request
that the manager wrongly tried to pipeline.

-- 
/Ingela - OTP team



More information about the erlang-questions mailing list