Erlang/OTP Forums

Author Message

<  Advanced Erlang/OTP  ~  httpc_manager__handler_db keeps growing ?

forcewill
Posted: Tue Apr 06, 2010 3:44 pm Reply with quote
User Joined: 12 Feb 2010 Posts: 19
Why does the ets httpc_manager_handler_db table keeps growing endless in R13B04 ?

im doind some async requests in the form:

[{"Connection", "close"} | Headers],
NewOptions = [{cookies, disabled}|Options],
http:set_options(NewOptions),

{ok, Ref} = http:request(post,
{URL,NewHeaders,
ContentType,
Request},
[{timeout,?HTTP_REQ_TIMEOUT}],
[{sync, false}, {full_result, true}, {body_format, string}]),


then waiting for the message

with

Response =
receive
{http, {Ref, Any}} ->
{ok, Any}

after ?HTTP_REQ_TIMEOUT ->
{error, timeout}
end,

...
And i do receive the response ....
View user's profile Send private message
zajda
Posted: Sat Apr 10, 2010 11:20 am Reply with quote
User Joined: 22 Aug 2009 Posts: 83
quick glance at the code of httpc says it in deed keeps session data. Httpc has well known issues with executing lots of calls and scalability. In stead of debugging httpc take a look at lhttpc (http://bitbucket.org/etc/lhttpc/wiki/Home) open source lightweight client. It has just basic futures, but scalability is definitely a real strength.
View user's profile Send private message
forcewill
Posted: Mon Apr 12, 2010 5:08 pm Reply with quote
User Joined: 12 Feb 2010 Posts: 19
I've just changed from async to sync and the outcome is the same ...

the table keeps growing ...
View user's profile Send private message

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum