Search code examples
http-status-code-404openshiftwildflyhttp-status-code-503

Temporary 503 and 404 for OpenShift hosted webapp


I deployed a webapp to WildFly 8.0.0 on OpenShift. The application currently has very few users, but works fine. I use a free OpenShift account (I don't know if it is relevant) with a single cartidge, for WildFly.

Sometimes, when I access the application I get 503 (sometimes) or 404 (most of the times) errors.

It seems that I get these errors if the application has not been used for some time (something like 2 or 3 days). For about a minute, if I reload the page I get the same error. But after about a minute, I do not get the errors any more, instead the application is correctly available.

It looks like OpenShift "disables" webapps if they have not been used for some time, then "re-enables" them as required (but displays 503 or 404 during the "re-enabling" of the webapps).

=> Is this a bug? Is this a well-known issue of OpenShift?

=> How can I prevent my webapp from being unavailable?

Regards


Solution

  • On the free plan, OpenShift will idle any gears that have not received an external HTTP request or git push in 2 days, as per this FAQ.

    If you are only using the 3 free gears, you can upgrade to the Bronze plan, which does not have any gear idling, and will not have any additional charges.