我的服务始终得到等了很久了:ServiceRecord错误奇巧 [英] My service always getting Waited long enough for: ServiceRecord error in Kitkat

查看:6595
本文介绍了我的服务始终得到等了很久了:ServiceRecord错误奇巧的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我这是在奇巧运行的后台服务始终抛等了足够长的时间:在logcat中ServiceRecord消息。但在$ Android的我的应用程序p $ pvious版本的平稳运行没有任何问题。

I have a background service which is running in kitkat always throwing Waited long enough for: ServiceRecord message in the logcat. But in the previous versions of android my app is running smoothly without any issues.

也有时候,我的服务会自动杀死在奇巧。

also Sometimes my service is automatically killed in the Kitkat.

推荐答案

这是造成序列化的后台服务运行修改为ActivityServices。

This is caused by "Serialize running of background services" modification for ActivityServices.

执行#10744011:序列化的后台服务运行   增加了一些code到活动管理器保持跟踪   服务正在启动和人数限制,可以   被同时启动。这只进场下   具体情况:当服务的推出是一个后台   请求(这样的定时并不重要)和它的过程是不   在一个较高的优先级已在运行。

Implement #10744011: Serialize running of background services Added some code to the activity manager to keep track of services that are launching and limit the number that can be launched concurrently. This only comes into play under specific circumstances: when the service launch is a background request (so timing is not important) and its process is not already running at a high priority.

在这种情况下,我们有服务中当前列表   启动和当得太大,我们开始推迟   推出的未来服务,直至目前推出的是   完蛋了。

In this case, we have a list of services that are currently launching and when that gets too big we start delaying the launch of future services until currently launching ones are finished.

有一些重要的调整参数是:有多少   后台服务,我们允许同时推出(目前   1上的低RAM器件,对其他设备3),以及多长时间我们   等待后台服务运行之前认为这是   一个更长时间运行的服务,并继续到下一个待   启动(目前设置为15秒)。

There are some important tuning parameters for this: how many background services we allow to launch concurrently (currently 1 on low-ram devices, 3 on other devices), and how long we wait for a background service to run before consider it to be a more long-running service and go on to the next pending launch (currently set to 15 seconds).

<一个href="https://github.com/android/platform_frameworks_base/commit/9210bc85545f31973c957b5179e6a82d05f473c6" rel="nofollow">https://github.com/android/platform_frameworks_base/commit/9210bc85545f31973c957b5179e6a82d05f473c6

这篇关于我的服务始终得到等了很久了:ServiceRecord错误奇巧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆