[1.2.4] Apache proxy and 503 Service Temporarily Unavailable

871 views
Skip to first unread message

Viktor H.

unread,
Feb 17, 2012, 1:02:17 PM2/17/12
to play-framework
Hello,

in production mode, I run my Play application behind an Apache server
(2.2.3). At the moment it's simply mod_proxy with a ProxyPass and a
ProxyPassReverse directive, I hope to play around with balancing soon.

After an update and the subsequent restart of Play, which triggers
precompilation:

* if I do not access my application until precompilation has finished
and it is ready (logfile says: "Listening for HTTP on port...") -
everything is fine, no restart of Apache is needed.

* if I access my application before it is ready, I get a 503 Service
Temporarily Unavailable. That's understandable, but I continue to get
this error long after the application has eventually completed its
startup! A "httpd reload" helps immediately.

Is there a standard way to deal with this? Setting a low ProxyTimeout
perhaps?

As an aside, if you want to get the maximum out of Play's asynchronous
server but still want a front-end, is it generally considered a good
idea to use an asynchronous front-end as well, i.e. nginx instead of
apache?

Thanks for reading, have a good week-end,
Viktor.

Viktor H.

unread,
Feb 17, 2012, 1:10:54 PM2/17/12
to play-framework
Should have read the mod_proxy documentation more carefully.
The retry=N option of the ProxyPass directive is what I wanted. Sorry!

Is there any "good practice" regarding the usage of nginx?
Recommended?

All the best,
Viktor.
Reply all
Reply to author
Forward
0 new messages