I have created a Service in my android application which starts automatically on BOOT_COMPLETE through BroadcastReceiver. And That is
Service
BOOT_COMPLETE
BroadcastReceiver
According to documentation.
Reasons your service is killed:
The Android system stops a service only when memory is low and it must recover system resources for the activity that has user focus.
So as long as the above condition isn't met, your service will run forever.