Free Openshift account has a condition which is called idling. In this case if your application won’t have any http request, the tier automatically will go to standby mode. However, if a request comes, the tier will be powered up automatically and response to the request with few seconds of delay. This situation causes no harm in web application that has interactive interface with end user.
For daemon services and background process, this case is troublesome and in my case for instance, I was wondering what was wrong with my service that it turned automatically off after 24 and baffled with any memory leakage or cpu high usage.
There are two solutions to resolve this problem.
- Switch to Bronze plan of Openshift by just adding your credit card number
- Use a bot to automatically hit your url on timely basis.
The first solution is quite straightforward, you just need to switch to Bronze planning and then your instance won’t be shut down and it will be running 24/7.
Second solution is quite exciting but more complex. In this scenario you just need to find a website like https://uptimerobot.com/ which is free and add your url there and set hitting interval. Then your instance will be alive all the time, even if there is no process to execute.
My recommendation is the first solution because it is safer practise and no need to be worry at all. For production use, it is more suitable and trustable as well.