I have a little problem with a simple HTTP GET request that I wrote and which will request a URL every X minutes. I had this once or twice a day when the process stopped in the middle of a GET request.
Here is an example debug log:
12-07 16:29:22.650 V/TAG(11655): Executing HTTP Request 12-07 16:29:25.336 D/dalvikvm(11655): GC_CONCURRENT freed 366K, 50% free 2824K/5639K, external 0K/0K, paused 3ms+3ms 12-07 16:29:25.526 D/dalvikvm(11655): GC_CONCURRENT freed 450K, 52% free 2825K/5767K, external 0K/0K, paused 2ms+2ms 12-07 16:29:29.990 I/ActivityManager( 1339): Process PackageName:remote (pid 11655) has died. 12-07 16:29:29.990 I/ActivityManager( 1339): Low Memory: No more background processes.
Now it just threw two problems for me:
At first, the timeout that I specified does not work:
HttpParams httpParameters = new BasicHttpParams(); int timeoutConnection = 10000; HttpConnectionParams.setConnectionTimeout(httpParameters, timeoutConnection); int timeoutSocket = 10000; HttpConnectionParams.setSoTimeout(httpParameters, timeoutSocket); HttpClient client=new DefaultHttpClient(httpParameters); HttpGet request=new HttpGet(url); Log.v(TAG,"Executing HTTP Request"); HttpResponse response=client.execute(request);
The second problem is that I donβt see the reason why the process died - is the message "dead" the same way if it is killed due to low memory? Since the timeout has not been reached here (client.execute is in the try / catch block)
Thank you for your responses!
source share