Forum: Rails deployment Production Env Issue: Ubuntu Mongrel Apache proxy Capistrano

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Navneet A. (Guest)
on 2007-05-15 01:12
Hi Everyone,
Context:

I am building a ruby on rails app. After I successfully built and tested
it in development environment, I used Capistrano to deploy it to a
different machine with pretty much same configuration. The server is a
Ubuntu linux box running Apache 2 and mongrel cluster. The application
is deployed using Capistrano.

Issue:
Even if I shut down mongrel cluster, and I open the root url of my site
in a browser (e.g www.mywebsite.com), apache still serves up content . I
don't know where it is getting it from. It seems like a cached version.
I'm expecting it to give me an error saying that Mongrel is down (or
something like that)

Similarly, when mongrel cluster is running, and I open the root url in
browser, still the STALE content is served rather than newer content
(which I know should be displayed).
I want www mywebsite com to use routing to get data from
www mywebsite com/mycontroller/myaction

If I open the complete url (including controller and action), then
correct content is served up. Note that this problem happens only in
Production environment.

Earlier I thought this was a routing error. But I've made sure that
correct routing is in place. Any pointers/help is really appreciated.

Thanks
Navneet
Vishnu G. (Guest)
on 2007-05-15 21:03
(Received via mailing list)
Are you using page caching? If so, ensure that cached files (by
default stored in public/ as controller/action.html or index.html)
should be deleted.

Vish
Navneet A. (Guest)
on 2007-05-15 22:32
Thanks Vishnu. index.html was there (I believe it was generated as a
page cache). I deleted it . But can you help me understand why does it
get created? So should I disable page caching. It might have an effect
on the performance.. Thoughts??

Thanks
Navneet

Vishnu G. wrote:
> Are you using page caching? If so, ensure that cached files (by
> default stored in public/ as controller/action.html or index.html)
> should be deleted.
>
> Vish
Vishnu G. (Guest)
on 2007-05-16 13:30
(Received via mailing list)
You should enable page caching, but have proper sweepers so that the
cache is deleted. Also, when your mongrels are down (which should
happen only on new code rollout), ensure that your webserver rewrite
rules searches for maintenance.html (assuming ur using capistrano),
and if that exists, only display that. Proper configs are all over the
net for Apache, nginx, and with a few hacks, lighttpd. Also, on
mongrel-cluster start/stop, you should delete your page cache.
Searching for a "page cache" tutorial on Google would help.

Vish
This topic is locked and can not be replied to.