Hans Hans - 10 days ago 6
Node.js Question

OpenShift hourly CRON shutting down every 12 hours

I've succesfully deployed an application to the OpenShift platform. It consists of a Nodejs server in contact with a MySQL database in the same application. Another python application has access to this database too and runs an hourly CRON script. All good and well, except the CRON application tends to shutdown every day twice at exactly the same time, 12 hours apart. I've been manually restarting the application now every day so my database stays up to date but it's really becoming tiresome to do and I would like not having to restart it all.

When checking the logs, it just says:

[Fri Nov 25 08:49:07 2016] [notice] caught SIGWINCH, shutting down gracefully


It doesn't have anything to do with my script because the error belongs to the python.log file and not to the cron_hourly.log file. I don't need any other service from the python application than the cron script. However, there's still a default python server running too I think, maybe this could cause it somehow? I tried to delete it alltogether but that just caused the cron script to fail too.

Any help much appreciated!

Answer

The problem seemed to be caused by the automatically idling of a free apllication tier after 24hrs with no activity on OpenShift. I managed to solve this by using uptimerobot.com to poll the domain every hour.