0

Android version: JellyBean (4.3)

We recently hit the above mentioned error message Empty Process Limit hit thrown by the ActivityManager. A search on Google with this string didn't result in any answer and/or explanation.

I also had a look into the AOSP source tree through AndroidXref, hoping I was going to find at least the place where this string would be printed. Couldn't find anything related though.

It also seems to be repeated every 5 seconds (accidentally also the time-out for ANR's, a coincidence???), as can be seen in the output snippet below:

03-29 11:41:07.041 1471-1674/system_process E/ActivityManager: Empty Process Limit hit
03-29 11:41:07.054 1471-1674/system_process E/ActivityManager: Empty Process Limit hit
03-29 11:41:11.541 1471-1471/system_process E/ActivityManager: Empty Process Limit hit
03-29 11:41:11.566 1471-1471/system_process E/ActivityManager: Empty Process Limit hit
03-29 11:41:16.613 1471-1674/system_process E/ActivityManager: Empty Process Limit hit
03-29 11:41:16.637 1471-1674/system_process E/ActivityManager: Empty Process Limit hit
03-29 11:41:21.518 1471-1674/system_process E/ActivityManager: Empty Process Limit hit
03-29 11:41:21.545 1471-1674/system_process E/ActivityManager: Empty Process Limit hit
03-29 11:41:27.082 1471-1674/system_process E/ActivityManager: Empty Process Limit hit
03-29 11:41:27.099 1471-1873/system_process E/ActivityManager: Empty Process Limit hit
03-29 11:41:31.495 1471-1471/system_process E/ActivityManager: Empty Process Limit hit
03-29 11:41:31.515 1471-1471/system_process E/ActivityManager: Empty Process Limit hit
03-29 11:41:36.140 1471-1471/system_process E/ActivityManager: Empty Process Limit hit
03-29 11:41:36.164 1471-1471/system_process E/ActivityManager: Empty Process Limit hit

Next to this, we don't see it from the very beginning of the app start-up, but rather after a while (couple of minutes).

Question: what does this mean?

GeertVc
  • 1,914
  • 17
  • 22
  • Does it happen when your application is in foreground or background? Also do you have any services running in different process? – Sagar Apr 01 '18 at 13:47
  • @Sagar: Yes, it happens when the app is in foreground. And indeed, there are services running in different processes. Could that have something to do with the issue we see? – GeertVc Apr 02 '18 at 12:35
  • I encountered it long time back, when my Application was in background and I had services in different process. It was because of `Background Process Limit` set under `Developer Options`. Someone in my team had set it to `No background Process`. When I set it to `Standard Limit` it was fine. You can try to do the same and check if its the same for you. – Sagar Apr 02 '18 at 12:55
  • @Sagar: Great tip! I'm on holidays now, but that'll be the first thing I will do when I'm back @ the office. Will keep you informed. – GeertVc Apr 02 '18 at 15:07
  • @Sagar: As promised, I'm coming back to this issue. In my case, the `Background Process Limit` was already put to `Standard Limit`. And in that situation, I had the problem. Changing the settings to anything else (e.g. `No background Process`) immediately stops the error! So, just the opposite as what you have experienced. Looks strange to me... Issue is that after a reboot, the `Background Process Limit` is set back to `Standard Limit`... Still a bit puzzled. – GeertVc Apr 09 '18 at 16:07
  • That's strange. How many Services are you running in separate process? – Sagar Apr 10 '18 at 07:39
  • @Sagar: Our app has a total of 63 services of which 58 are ours (rest is Android). Those 58 services are divided over 27 processes. Most of the processes have 1 service, some processes have 8 to 9 services. – GeertVc Apr 15 '18 at 13:58
  • Looks like you are having too many Empty Proceeses. Whenever a Service is destroyed, OS holds on the process so that it can re-use them when a new request comes and make the loading faster. It is mostly done when the app is used frequently. Its called Empty Process. In your case it doesn't happen when you set settings to "No Background Process" because your processes are terminated immediately. – Sagar Apr 15 '18 at 14:07
  • Generally the processes are freed when OS needs memory for other tasks. But may be your device running 4.3 might not be able todo so and ActivityManager gets paniced. This could be the only explanation to the issue you are facing. Try to destroy the process when Service is destroyed. You can try to limit the number of processes started by your app. – Sagar Apr 15 '18 at 14:11

0 Answers0