Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Developer
Posts: 23
Registered: ‎04-29-2009
My Device: Not Specified

Internet Connection Lost After Several HttpConnections

I recently wrote an RSS reader and built in a feature that would automatically refresh all of the feeds in the background (one at a time), but have noticed that after about 4th or 5th success HttpConnection, my phone (Verizon Storm) loses its Internet connection and all of the HttpConnection requests fail.  If I exit out to the home screen I notice that is says 1xev instead of 1xEV and if I open the web browser it'll go back to 1xEV and my application will start working again.  Any ideas on what is going on?
Developer
Posts: 905
Registered: ‎02-07-2009
My Device: BlackBerry Torch 9800

Re: Internet Connection Lost After Several HttpConnections

what network transport protocol are you using? BES, BIS-B, direct tcp, etc...?
Developer
Posts: 73
Registered: ‎05-27-2009
My Device: Not Specified

Re: Internet Connection Lost After Several HttpConnections

Is it unlocked? I had a similar problem with my unlocked phone.
Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Internet Connection Lost After Several HttpConnections

Are you closing each connection when your transaction is complete?

 

Developer
Posts: 1,415
Registered: ‎07-30-2008
My Device: Not Specified

Re: Internet Connection Lost After Several HttpConnections

Can you be more specific? When it fails whata does it do? If it hands, in what method, or are you getting a null

back? If it fails after 4-5 conns and then starts again after a timeout ( 2minutes circa ) then you probably

aren't closing connections. If you are getting DNS or other errors, well, let's just say no one wants to be

clear on this but try using IP numbers and see if that helps.

 

New Developer
Posts: 23
Registered: ‎04-29-2009
My Device: Not Specified

Re: Internet Connection Lost After Several HttpConnections

I'm closing the connections, but if I have to guess it's acting like the connections aren't closing and it just times out.....is there a chance that connection.close() doesn't close immediately? 
New Developer
Posts: 23
Registered: ‎04-29-2009
My Device: Not Specified

Re: Internet Connection Lost After Several HttpConnections

I've tried all connection methods except BIS-B, I don't have access to the connection string for BIS-B.
Developer
Posts: 905
Registered: ‎02-07-2009
My Device: BlackBerry Torch 9800

Re: Internet Connection Lost After Several HttpConnections

you need to be an alliance member to have access to it. 

 

anyway, can you post your Http code here?  

New Developer
Posts: 23
Registered: ‎04-29-2009
My Device: Not Specified

Re: Internet Connection Lost After Several HttpConnections

I found that I had a "watchdog" thread monitoring thread for the httpconnection to ensure it wasn't taking too long and I was firing up a new httpconnection thread before closing the first one, so in the case where several threads died back-to-back the watchdog would keep firing up new ones, which after about 4 of them it just snowballed on itself and killed the whole process.