You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Graeme Wallace <gr...@farecompare.com> on 2015/08/31 09:48:13 UTC

Async problem with GET

I'm running into a strange problem using async http components. I have a
site that i'm using GET to pull information back from on a fairly regular
basis - maybe a query every minute or so.

After about 8 hours - the site starts sending back its homepage instead of
the information i'm requesting the URL. The only way to fix it is to
restart the application i'm running - which makes no sense.

I'm kind of at a loss on how to debug this one because it takes so long for
the problem to show up, and that its fixed by restarting the application.
this would suggest its something down in the guts of async http components
- but i've no idea where.

Any suggestions ?


-- 
Graeme Wallace
CTO
FareCompare.com
O: 972 588 1414
M: 214 681 9018

Re: Async problem with GET

Posted by Stefan Magnus Landrø <st...@gmail.com>.

Sendt fra min iPhone

> Den 31. aug. 2015 kl. 09.48 skrev Graeme Wallace <gr...@farecompare.com>:
> 
> I'm running into a strange problem using async http components. I have a
> site that i'm using GET to pull information back from on a fairly regular
> basis - maybe a query every minute or so.
> 
> After about 8 hours - the site starts sending back its homepage instead of
> the information i'm requesting the URL. The only way to fix it is to
> restart the application i'm running - which makes no sense.

Have you performed a heap dump to see why it crashes? The issue should be fairly easy to reproduce in a few minutes in a test env

I recommend using eclipse mat to find root cause. 



> 
> I'm kind of at a loss on how to debug this one because it takes so long for
> the problem to show up, and that its fixed by restarting the application.
> this would suggest its something down in the guts of async http components
> - but i've no idea where.
> 
> Any suggestions ?
> 
> 
> -- 
> Graeme Wallace
> CTO
> FareCompare.com
> O: 972 588 1414
> M: 214 681 9018

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: Async problem with GET

Posted by Stefan Magnus Landrø <st...@gmail.com>.

Sendt fra min iPhone

> Den 31. aug. 2015 kl. 18.06 skrev Oleg Kalnichevski <ol...@apache.org>:
> 
>> On Mon, 2015-08-31 at 18:01 +0200, Stefan Magnus Landrø wrote:
>> 
>> Sendt fra min iPhone
>> 
>>>> Den 31. aug. 2015 kl. 11.07 skrev Oleg Kalnichevski <ol...@apache.org>:
>>>> 
>>>> On Mon, 2015-08-31 at 08:48 +0100, Graeme Wallace wrote:
>>>> I'm running into a strange problem using async http components. I have a
>>>> site that i'm using GET to pull information back from on a fairly regular
>>>> basis - maybe a query every minute or so.
>>>> 
>>>> After about 8 hours - the site starts sending back its homepage instead of
>>>> the information i'm requesting the URL. The only way to fix it is to
>>>> restart the application i'm running - which makes no sense.
>>>> 
>>>> I'm kind of at a loss on how to debug this one because it takes so long for
>>>> the problem to show up, and that its fixed by restarting the application.
>>>> this would suggest its something down in the guts of async http components
>>>> - but i've no idea where.
>>>> 
>>>> Any suggestions ?
>>> 
>>> Graeme,
>>> 
>>> How could this possibly be something down in the guts of HC? Alien
>>> conspiracy? Russian spies?
>>> 
>>> Have you tried resetting the session (by wiping out the cookies) instead
>>> of restarting the app?
>> 
>> Do you think the session is accumulating more and more data? If so, why not log out of app or disable cookie support client side (or is the resource login protected?)
> 
> That is my theory. I cannot think of anything that could be possibly
> causing this issue on the client side.
> 

Agreed. 

> Oleg
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: Async problem with GET

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Mon, 2015-08-31 at 18:01 +0200, Stefan Magnus Landrø wrote:
> 
> Sendt fra min iPhone
> 
> > Den 31. aug. 2015 kl. 11.07 skrev Oleg Kalnichevski <ol...@apache.org>:
> > 
> >> On Mon, 2015-08-31 at 08:48 +0100, Graeme Wallace wrote:
> >> I'm running into a strange problem using async http components. I have a
> >> site that i'm using GET to pull information back from on a fairly regular
> >> basis - maybe a query every minute or so.
> >> 
> >> After about 8 hours - the site starts sending back its homepage instead of
> >> the information i'm requesting the URL. The only way to fix it is to
> >> restart the application i'm running - which makes no sense.
> >> 
> >> I'm kind of at a loss on how to debug this one because it takes so long for
> >> the problem to show up, and that its fixed by restarting the application.
> >> this would suggest its something down in the guts of async http components
> >> - but i've no idea where.
> >> 
> >> Any suggestions ?
> > 
> > Graeme,
> > 
> > How could this possibly be something down in the guts of HC? Alien
> > conspiracy? Russian spies?
> > 
> > Have you tried resetting the session (by wiping out the cookies) instead
> > of restarting the app?
> 
> Do you think the session is accumulating more and more data? If so, why not log out of app or disable cookie support client side (or is the resource login protected?)
> 

That is my theory. I cannot think of anything that could be possibly
causing this issue on the client side.

Oleg



---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: Async problem with GET

Posted by Stefan Magnus Landrø <st...@gmail.com>.

Sendt fra min iPhone

> Den 31. aug. 2015 kl. 11.07 skrev Oleg Kalnichevski <ol...@apache.org>:
> 
>> On Mon, 2015-08-31 at 08:48 +0100, Graeme Wallace wrote:
>> I'm running into a strange problem using async http components. I have a
>> site that i'm using GET to pull information back from on a fairly regular
>> basis - maybe a query every minute or so.
>> 
>> After about 8 hours - the site starts sending back its homepage instead of
>> the information i'm requesting the URL. The only way to fix it is to
>> restart the application i'm running - which makes no sense.
>> 
>> I'm kind of at a loss on how to debug this one because it takes so long for
>> the problem to show up, and that its fixed by restarting the application.
>> this would suggest its something down in the guts of async http components
>> - but i've no idea where.
>> 
>> Any suggestions ?
> 
> Graeme,
> 
> How could this possibly be something down in the guts of HC? Alien
> conspiracy? Russian spies?
> 
> Have you tried resetting the session (by wiping out the cookies) instead
> of restarting the app?

Do you think the session is accumulating more and more data? If so, why not log out of app or disable cookie support client side (or is the resource login protected?)


> 
> Oleg
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: Async problem with GET

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Mon, 2015-08-31 at 14:18 +0100, Graeme Wallace wrote:
> > How could this possibly be something down in the guts of HC? Alien
> > conspiracy? Russian spies?
> >
> 
> I was thinking cosmic background radiation....
> 

Exactly! All because of Russians!

> 
> >
> > Have you tried resetting the session (by wiping out the cookies) instead
> > of restarting the app?
> >
> 
> 
> How would i do that for a specific host ?
> 
> 

You can do so by examining the effective domain attribute of cookies in
the cookie store and discard those that match the host. 

http://hc.apache.org/httpcomponents-client-4.5.x/tutorial/html/statemgmt.html#d5e499

Please note you need to be careful when matching host to domain
attribute of a cookie 

http://hc.apache.org/httpcomponents-client-4.5.x/httpclient/xref/org/apache/http/impl/cookie/RFC2965DomainAttributeHandler.html#172

Oleg


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: Async problem with GET

Posted by Graeme Wallace <gr...@farecompare.com>.
> How could this possibly be something down in the guts of HC? Alien
> conspiracy? Russian spies?
>

I was thinking cosmic background radiation....


>
> Have you tried resetting the session (by wiping out the cookies) instead
> of restarting the app?
>


How would i do that for a specific host ?


regards,



-- 
Graeme Wallace
CTO
FareCompare.com
O: 972 588 1414
M: 214 681 9018

Re: Async problem with GET

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Mon, 2015-08-31 at 08:48 +0100, Graeme Wallace wrote:
> I'm running into a strange problem using async http components. I have a
> site that i'm using GET to pull information back from on a fairly regular
> basis - maybe a query every minute or so.
> 
> After about 8 hours - the site starts sending back its homepage instead of
> the information i'm requesting the URL. The only way to fix it is to
> restart the application i'm running - which makes no sense.
> 
> I'm kind of at a loss on how to debug this one because it takes so long for
> the problem to show up, and that its fixed by restarting the application.
> this would suggest its something down in the guts of async http components
> - but i've no idea where.
> 
> Any suggestions ?
> 
> 

Graeme,

How could this possibly be something down in the guts of HC? Alien
conspiracy? Russian spies?

Have you tried resetting the session (by wiping out the cookies) instead
of restarting the app?

Oleg


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org