android process has died,Android: Process has died - low resources?

I've a little problem with a simple HTTP GET request that I've written and which will request a URL every X minutes. I had it once or twice a day that the process stopped in the midst of the GET request.

Here's an example of the 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 this just threw up two problems for me: First, the timeout that I've 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 cannot see a reason why the process has died - is this the 'died' message the same if it is getting killed due to low memory? Because the timeout has not been reached here (client.execute is in a try / catch block)

Thanks for your replies!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值