How do I increase the task response timeout window? I have a Samsung Galaxy S3 I9300 running CyanogenMod 11 (Android 4.4.4). Over time I have noticed that most of my system stability issues are because Android appears to have a "timeout" period for tasks, and if a task does not respond within a certain time (e.g. when I try to load a web page with enough Javascript to put significant load on a latest generation Mac), the OS declares that the task has hung and axes it. This has been happening with increasing frequency as mobile websites have been expecting me to have an increasingly powerful phone, e.g. it does not happen on my Samsung Galaxy S5 nor on a friend's Galaxy S6 Edge.

I tried looking under my sysctl and build settings on System Tuner for a setting that controls this "activity response timeout" but couldn't find any. Is there a way to increase this timeout?
This timeout is actually hardcoded into the runtime, as below:

In Android, application responsiveness is monitored by the Activity Manager and Window Manager system services. Android will display the ANR dialog for a particular application when it detects one of the following conditions:


No response to an input event (such as key press or screen touch events) within 5 seconds.
A BroadcastReceiver hasn't finished executing within 10 seconds.


This is relevant to apps themselves, but Chrome (or whatever browser you are using) can also be affected as above.

For further information refer to the Android Developer's Guide: Maintaining Application Responsiveness.