Quantcast

httpc manager crashes

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

httpc manager crashes

Suma Shivaprasad
We have an app that makes a lot of calls to httpc and we are seeing the following error in sasl logs quite often.

CRASH REPORT==== 27-Apr-2011::05:21:24 ===
  crasher:
    initial call: httpc_manager:init/1
    pid: <0.10297.0>
    registered_name: httpc_manager_profile_8261
    exception exit: {{case_clause,
                         [{handler_info,#Ref<0.0.398.166371>,undefined,
                              <0.12971.248>,undefined,operational}]},
                     [{httpc_manager,handle_connect_and_send,5},
                      {httpc_manager,handle_info,2},
                      {gen_server,handle_msg,5},
                      {proc_lib,init_p_do_apply,3}]}
      in function  gen_server:terminate/6
    ancestors: [httpc_profile_sup,httpc_sup,inets_sup,<0.46.0>



and


=CRASH REPORT==== 27-Apr-2011::05:30:18 ===
  crasher:
    initial call: httpc_manager:init/1
    pid: <0.22933.12>
    registered_name: httpc_manager_profile_8122
    exception exit: {{case_clause,
                         [{handler_info,#Ref<0.0.418.148452>,<0.20608.257>,
                              undefined,<0.15267.257>,initiating}]},
                     [{httpc_manager,handle_connect_and_send,5},
                      {httpc_manager,handle_info,2},
                      {gen_server,handle_msg,5},
                      {proc_lib,init_p_do_apply,3}]}
      in function  gen_server:terminate/6
    ancestors: [httpc_profile_sup,httpc_sup,inets_sup,<0.46.0>]
    messages: [{'EXIT',<0.20574.257>,normal}]
    links: [<0.50.0>,<0.20608.257>]
    dictionary: []


Has anyone else seen these errors or have a fix for this?

Thanks
Suma



_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: httpc manager crashes

maruthavanan s
Hi,
 
I have faced the same situtation saw a mail in the same forum suggesting ibrowse and it worked like a charm for me.
 
I suggest the same.
 
Regards,
Marutha
 

Date: Wed, 27 Apr 2011 19:30:03 +0530
From: [hidden email]
To: [hidden email]
Subject: [erlang-questions] httpc manager crashes

We have an app that makes a lot of calls to httpc and we are seeing the following error in sasl logs quite often.

CRASH REPORT==== 27-Apr-2011::05:21:24 ===
  crasher:
    initial call: httpc_manager:init/1
    pid: <0.10297.0>
    registered_name: httpc_manager_profile_8261
    exception exit: {{case_clause,
                         [{handler_info,#Ref<0.0.398.166371>,undefined,
                              <0.12971.248>,undefined,operational}]},
                     [{httpc_manager,handle_connect_and_send,5},
                      {httpc_manager,handle_info,2},
                      {gen_server,handle_msg,5},
                      {proc_lib,init_p_do_apply,3}]}
      in function  gen_server:terminate/6
    ancestors: [httpc_profile_sup,httpc_sup,inets_sup,<0.46.0>



and


=CRASH REPORT==== 27-Apr-2011::05:30:18 ===
  crasher:
    initial call: httpc_manager:init/1
    pid: <0.22933.12>
    registered_name: httpc_manager_profile_8122
    exception exit: {{case_clause,
                         [{handler_info,#Ref<0.0.418.148452>,<0.20608.257>,
                              undefined,<0.15267.257>,initiating}]},
                     [{httpc_manager,handle_connect_and_send,5},
                      {httpc_manager,handle_info,2},
                      {gen_server,handle_msg,5},
                      {proc_lib,init_p_do_apply,3}]}
      in function  gen_server:terminate/6
    ancestors: [httpc_profile_sup,httpc_sup,inets_sup,<0.46.0>]
    messages: [{'EXIT',<0.20574.257>,normal}]
    links: [<0.50.0>,<0.20608.257>]
    dictionary: []


Has anyone else seen these errors or have a fix for this?

Thanks
Suma



_______________________________________________ erlang-questions mailing list [hidden email] http://erlang.org/mailman/listinfo/erlang-questions
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: httpc manager crashes

Ingela Andin
In reply to this post by Suma Shivaprasad
Hi!

What version of inets and Erlang are you using?  What HTTP version HTTP-1.0 ?
If there is a bug we will of course fix it.

Regards Ingela Erlang/OTP - Ericsson AB


2011/4/27 Suma Shivaprasad <[hidden email]>:

> We have an app that makes a lot of calls to httpc and we are seeing the
> following error in sasl logs quite often.
>
> CRASH REPORT==== 27-Apr-2011::05:21:24 ===
>   crasher:
>     initial call: httpc_manager:init/1
>     pid: <0.10297.0>
>     registered_name: httpc_manager_profile_8261
>     exception exit: {{case_clause,
>                          [{handler_info,#Ref<0.0.398.166371>,undefined,
>                               <0.12971.248>,undefined,operational}]},
>                      [{httpc_manager,handle_connect_and_send,5},
>                       {httpc_manager,handle_info,2},
>                       {gen_server,handle_msg,5},
>                       {proc_lib,init_p_do_apply,3}]}
>       in function  gen_server:terminate/6
>     ancestors: [httpc_profile_sup,httpc_sup,inets_sup,<0.46.0>
>
>
>
> and
>
>
> =CRASH REPORT==== 27-Apr-2011::05:30:18 ===
>   crasher:
>     initial call: httpc_manager:init/1
>     pid: <0.22933.12>
>     registered_name: httpc_manager_profile_8122
>     exception exit: {{case_clause,
>                          [{handler_info,#Ref<0.0.418.148452>,<0.20608.257>,
>                               undefined,<0.15267.257>,initiating}]},
>                      [{httpc_manager,handle_connect_and_send,5},
>                       {httpc_manager,handle_info,2},
>                       {gen_server,handle_msg,5},
>                       {proc_lib,init_p_do_apply,3}]}
>       in function  gen_server:terminate/6
>     ancestors: [httpc_profile_sup,httpc_sup,inets_sup,<0.46.0>]
>     messages: [{'EXIT',<0.20574.257>,normal}]
>     links: [<0.50.0>,<0.20608.257>]
>     dictionary: []
>
>
> Has anyone else seen these errors or have a fix for this?
>
> Thanks
> Suma
>
>
>
> _______________________________________________
> erlang-questions mailing list
> [hidden email]
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: httpc manager crashes

Suma Shivaprasad
Hi,

We are using inets - 5.5.1 and HTTP/1.1.  We are creating a new httpc profile for every request that we make and around 300 concurrent requests were running at the same time . Is this fine?  How many maximum profiles has httpc been tested with for concurrent use?

Thanks
Suma

On Thu, Apr 28, 2011 at 2:53 PM, Ingela Andin <[hidden email]> wrote:
Hi!

What version of inets and Erlang are you using?  What HTTP version HTTP-1.0 ?
If there is a bug we will of course fix it.

Regards Ingela Erlang/OTP - Ericsson AB


2011/4/27 Suma Shivaprasad <[hidden email]>:
> We have an app that makes a lot of calls to httpc and we are seeing the
> following error in sasl logs quite often.
>
> CRASH REPORT==== 27-Apr-2011::05:21:24 ===
>   crasher:
>     initial call: httpc_manager:init/1
>     pid: <0.10297.0>
>     registered_name: httpc_manager_profile_8261
>     exception exit: {{case_clause,
>                          [{handler_info,#Ref<0.0.398.166371>,undefined,
>                               <0.12971.248>,undefined,operational}]},
>                      [{httpc_manager,handle_connect_and_send,5},
>                       {httpc_manager,handle_info,2},
>                       {gen_server,handle_msg,5},
>                       {proc_lib,init_p_do_apply,3}]}
>       in function  gen_server:terminate/6
>     ancestors: [httpc_profile_sup,httpc_sup,inets_sup,<0.46.0>
>
>
>
> and
>
>
> =CRASH REPORT==== 27-Apr-2011::05:30:18 ===
>   crasher:
>     initial call: httpc_manager:init/1
>     pid: <0.22933.12>
>     registered_name: httpc_manager_profile_8122
>     exception exit: {{case_clause,
>                          [{handler_info,#Ref<0.0.418.148452>,<0.20608.257>,
>                               undefined,<0.15267.257>,initiating}]},
>                      [{httpc_manager,handle_connect_and_send,5},
>                       {httpc_manager,handle_info,2},
>                       {gen_server,handle_msg,5},
>                       {proc_lib,init_p_do_apply,3}]}
>       in function  gen_server:terminate/6
>     ancestors: [httpc_profile_sup,httpc_sup,inets_sup,<0.46.0>]
>     messages: [{'EXIT',<0.20574.257>,normal}]
>     links: [<0.50.0>,<0.20608.257>]
>     dictionary: []
>
>
> Has anyone else seen these errors or have a fix for this?
>
> Thanks
> Suma
>
>
>
> _______________________________________________


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: httpc manager crashes

Ingela Andin-2
Hi!

A httpc-profile could be view as a "browser core", it saves options
that you want to use for all requests such as proxy-options,
it handles cookies, it dispatches requests for pipelining or
persistent HTTP-connections queues, it could even do caching but that
is not implemented at the moment.  There is no hard limit on how many
profiles you can use, a profile is mainly a new dispatcher process.
300 erlang-processes is no problem at all, but starting a new profile
for every request I think is a bit of an odd strategy.  Why do you do
that? The manager process will spawn a new request-handler process for
each request unless it can be pipelined, or if pipelining is not
enabled by setting the pipeline timeout and there is a persistent
connection that can be used to queue the request on. Length of
pipeline and persistent
connection-queues are configurable. After the request has been
dispatched to the handler process that process will handle the request
and send the answer to the client without any synchronizing with the
manager process. The manager process should not be very busy so it
should not be a big bottleneck and if it gets too busy we might have
to change its implementation.

We also think we know what is causing your problem and we will fix it
as soon as possible.

Regards Ingela Erlang/OTP team - Ericsson AB


2011/4/28 Suma Shivaprasad <[hidden email]>:

> Hi,
>
> We are using inets - 5.5.1 and HTTP/1.1.  We are creating a new httpc
> profile for every request that we make and around 300 concurrent requests
> were running at the same time . Is this fine?  How many maximum profiles has
> httpc been tested with for concurrent use?
>
> Thanks
> Suma
>
> On Thu, Apr 28, 2011 at 2:53 PM, Ingela Andin <[hidden email]>
> wrote:
>>
>> Hi!
>>
>> What version of inets and Erlang are you using?  What HTTP version
>> HTTP-1.0 ?
>> If there is a bug we will of course fix it.
>>
>> Regards Ingela Erlang/OTP - Ericsson AB
>>
>>
>> 2011/4/27 Suma Shivaprasad <[hidden email]>:
>> > We have an app that makes a lot of calls to httpc and we are seeing the
>> > following error in sasl logs quite often.
>> >
>> > CRASH REPORT==== 27-Apr-2011::05:21:24 ===
>> >   crasher:
>> >     initial call: httpc_manager:init/1
>> >     pid: <0.10297.0>
>> >     registered_name: httpc_manager_profile_8261
>> >     exception exit: {{case_clause,
>> >                          [{handler_info,#Ref<0.0.398.166371>,undefined,
>> >                               <0.12971.248>,undefined,operational}]},
>> >                      [{httpc_manager,handle_connect_and_send,5},
>> >                       {httpc_manager,handle_info,2},
>> >                       {gen_server,handle_msg,5},
>> >                       {proc_lib,init_p_do_apply,3}]}
>> >       in function  gen_server:terminate/6
>> >     ancestors: [httpc_profile_sup,httpc_sup,inets_sup,<0.46.0>
>> >
>> >
>> >
>> > and
>> >
>> >
>> > =CRASH REPORT==== 27-Apr-2011::05:30:18 ===
>> >   crasher:
>> >     initial call: httpc_manager:init/1
>> >     pid: <0.22933.12>
>> >     registered_name: httpc_manager_profile_8122
>> >     exception exit: {{case_clause,
>> >
>> > [{handler_info,#Ref<0.0.418.148452>,<0.20608.257>,
>> >                               undefined,<0.15267.257>,initiating}]},
>> >                      [{httpc_manager,handle_connect_and_send,5},
>> >                       {httpc_manager,handle_info,2},
>> >                       {gen_server,handle_msg,5},
>> >                       {proc_lib,init_p_do_apply,3}]}
>> >       in function  gen_server:terminate/6
>> >     ancestors: [httpc_profile_sup,httpc_sup,inets_sup,<0.46.0>]
>> >     messages: [{'EXIT',<0.20574.257>,normal}]
>> >     links: [<0.50.0>,<0.20608.257>]
>> >     dictionary: []
>> >
>> >
>> > Has anyone else seen these errors or have a fix for this?
>> >
>> > Thanks
>> > Suma
>> >
>> >
>> >
>> > _______________________________________________
>> > erlang-questions mailing list
>> > [hidden email]
>> > http://erlang.org/mailman/listinfo/erlang-questions
>> >
>> >
>
>
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: httpc manager crashes

KuTtZ
Helo Ingela

I am Suma's colleague. Let me try to give more context to the issue we are facing..

* Our app make a LOT (in the range of around 300) of http requests concurrently.
* There are two types of requests
   1) POST requests : These require us to go thru a proxy. These can themselves hit about 150  - 200concurrent requests.
   2) GET requests :  Standard http requests.

As far as the GET requests are concerned, we start some 300 profiles and randomly pick one for use.

Since we have to send our POSTs via a proxy, at app initialialization time, we start 1 httpc profile. We see a lot of httpc_manager crashes pertaining to this particular profile. I understand that the httpc_manager is supposed to be a pretty light weight process.. not requiring any synchronization with the manager.. Is there a chance that the httpc_manager can crash ? Also, I was wondering, is the Data to be posted also copied to the httpc_managers message queue before its again copied to the handlers message queue before actually sending ?


Regards
-Arun
   


On Fri, Apr 29, 2011 at 12:49 PM, Ingela Andin <[hidden email]> wrote:
Hi!

A httpc-profile could be view as a "browser core", it saves options
that you want to use for all requests such as proxy-options,
it handles cookies, it dispatches requests for pipelining or
persistent HTTP-connections queues, it could even do caching but that
is not implemented at the moment.  There is no hard limit on how many
profiles you can use, a profile is mainly a new dispatcher process.
300 erlang-processes is no problem at all, but starting a new profile
for every request I think is a bit of an odd strategy.  Why do you do
that? The manager process will spawn a new request-handler process for
each request unless it can be pipelined, or if pipelining is not
enabled by setting the pipeline timeout and there is a persistent
connection that can be used to queue the request on. Length of
pipeline and persistent
connection-queues are configurable. After the request has been
dispatched to the handler process that process will handle the request
and send the answer to the client without any synchronizing with the
manager process. The manager process should not be very busy so it
should not be a big bottleneck and if it gets too busy we might have
to change its implementation.

We also think we know what is causing your problem and we will fix it
as soon as possible.

Regards Ingela Erlang/OTP team - Ericsson AB


2011/4/28 Suma Shivaprasad <[hidden email]>:
> Hi,
>
> We are using inets - 5.5.1 and HTTP/1.1.  We are creating a new httpc
> profile for every request that we make and around 300 concurrent requests
> were running at the same time . Is this fine?  How many maximum profiles has
> httpc been tested with for concurrent use?
>
> Thanks
> Suma
>
> On Thu, Apr 28, 2011 at 2:53 PM, Ingela Andin <[hidden email]>
> wrote:
>>
>> Hi!
>>
>> What version of inets and Erlang are you using?  What HTTP version
>> HTTP-1.0 ?
>> If there is a bug we will of course fix it.
>>
>> Regards Ingela Erlang/OTP - Ericsson AB
>>
>>
>> 2011/4/27 Suma Shivaprasad <[hidden email]>:
>> > We have an app that makes a lot of calls to httpc and we are seeing the
>> > following error in sasl logs quite often.
>> >
>> > CRASH REPORT==== 27-Apr-2011::05:21:24 ===
>> >   crasher:
>> >     initial call: httpc_manager:init/1
>> >     pid: <0.10297.0>
>> >     registered_name: httpc_manager_profile_8261
>> >     exception exit: {{case_clause,
>> >                          [{handler_info,#Ref<0.0.398.166371>,undefined,
>> >                               <0.12971.248>,undefined,operational}]},
>> >                      [{httpc_manager,handle_connect_and_send,5},
>> >                       {httpc_manager,handle_info,2},
>> >                       {gen_server,handle_msg,5},
>> >                       {proc_lib,init_p_do_apply,3}]}
>> >       in function  gen_server:terminate/6
>> >     ancestors: [httpc_profile_sup,httpc_sup,inets_sup,<0.46.0>
>> >
>> >
>> >
>> > and
>> >
>> >
>> > =CRASH REPORT==== 27-Apr-2011::05:30:18 ===
>> >   crasher:
>> >     initial call: httpc_manager:init/1
>> >     pid: <0.22933.12>
>> >     registered_name: httpc_manager_profile_8122
>> >     exception exit: {{case_clause,
>> >
>> > [{handler_info,#Ref<0.0.418.148452>,<0.20608.257>,
>> >                               undefined,<0.15267.257>,initiating}]},
>> >                      [{httpc_manager,handle_connect_and_send,5},
>> >                       {httpc_manager,handle_info,2},
>> >                       {gen_server,handle_msg,5},
>> >                       {proc_lib,init_p_do_apply,3}]}
>> >       in function  gen_server:terminate/6
>> >     ancestors: [httpc_profile_sup,httpc_sup,inets_sup,<0.46.0>]
>> >     messages: [{'EXIT',<0.20574.257>,normal}]
>> >     links: [<0.50.0>,<0.20608.257>]
>> >     dictionary: []
>> >
>> >
>> > Has anyone else seen these errors or have a fix for this?
>> >
>> > Thanks
>> > Suma
>> >
>> >
>> >
>> > _______________________________________________
>> > erlang-questions mailing list
>> > [hidden email]
>> > http://erlang.org/mailman/listinfo/erlang-questions
>> >
>> >
>
>
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: httpc manager crashes

Ingela Andin-2
Hi!

2011/4/29 Arun Suresh <[hidden email]>:

> Helo Ingela
> I am Suma's colleague. Let me try to give more context to the issue we are
> facing..
> * Our app make a LOT (in the range of around 300) of http requests
> concurrently.
> * There are two types of requests
>    1) POST requests : These require us to go thru a proxy. These can
> themselves hit about 150  - 200concurrent requests.
>    2) GET requests :  Standard http requests.
> As far as the GET requests are concerned, we start some 300 profiles and
> randomly pick one for use.
> Since we have to send our POSTs via a proxy, at app initialialization time,
> we start 1 httpc profile. We see a lot of httpc_manager crashes pertaining
> to this particular profile. I understand that the httpc_manager is supposed
> to be a pretty light weight process.. not requiring any synchronization with
> the manager.. Is there a chance that the httpc_manager can crash ? Also, I
> was wondering, is the Data to be posted also copied to the httpc_managers
> message queue before its again copied to the handlers message queue before
> actually sending ?

Crashes are always a possibility and the httpc_manager will be restarted if
it crashes.  But normally it should not crash. We think the behavior
you have seen is
a bug, and we are working on fixing it.  There are also some other
known problems
such as the copying issue  of the request information that is unnecessary.
We are are working on solving this too but it may require a little more work to
make a good solution and we are as always struggling with priorities
of all things
we need to do, but it is in the plans.

Regards Ingela Erlang OTP team - Ericsson AB
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Loading...