We have a number of Samsung android devices running Bit Web server or Kick Web server (and previously KSWeb) and have encountered a recent issue with the web server and mysql server processes being stopped after a few hours (typically 2) of activity. Any calls to localhost after that return status 503. The device never goes to sleep during that time and starting the services again results in normal operation. We've tried turning optimizations off everywhere we can find them, upgrading from Android 5 to 6 and using Samsung Smart Manager to specify not to optimize the servers for battery use, and finally going to a minimal android image that has all the optimizations turned off, and every time the processes still stop at about the 2 hour mark.
Does anyone have any ideas as to how to identify what is stopping this process, or if it is stopping itself? Thanks.