caching issue

11 views
Skip to first unread message

badnaam

unread,
Aug 31, 2010, 1:47:07 AM8/31/10
to Phusion Passenger Discussions


I have posted another question similar to this, which I thought I
resolved. But it is coming back with another symptom.

I am using REE/Passenger/Nginx and have the following in my nginx.conf

location ~* ^.+.(jpg|jpeg|gif|png|css|js|swf)?([0-9]+)?$ { expires
max; passenger_enabled on; }

Ever since I did this, it seems sometimes, the client gets server with
cached pages, like for normal .html.erb pages. So if I go to
http://localhost/posts/22 I might see the version of post 22 that was
last seen for another user. This isn't happening if I run the app on
webrick.

Hongli Lai

unread,
Aug 31, 2010, 6:00:01 AM8/31/10
to phusion-...@googlegroups.com

Looks like you have page caching turned on?

--
Phusion | The Computer Science Company

Web: http://www.phusion.nl/
E-mail: in...@phusion.nl
Chamber of commerce no: 08173483 (The Netherlands)

Anuj Dutta

unread,
Aug 31, 2010, 5:55:09 AM8/31/10
to phusion-...@googlegroups.com
Hello,

Let me rephrase this:

You are experiencing caching issues with webrick? How is it related to Passenger? 

Anuj



--
You received this message because you are subscribed to the Google Groups "Phusion Passenger Discussions" group.
To post to this group, send email to phusion-...@googlegroups.com.
To unsubscribe from this group, send email to phusion-passen...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/phusion-passenger?hl=en.




--
Anuj DUTTA

Hongli Lai

unread,
Aug 31, 2010, 6:31:04 AM8/31/10
to phusion-...@googlegroups.com
On Tue, Aug 31, 2010 at 11:55 AM, Anuj Dutta <dutta...@googlemail.com> wrote:
> Hello,
> Let me rephrase this:
> You are experiencing caching issues with webrick? How is it related to
> Passenger?

I've never experienced any kinds of caching issues in Phusion Passenger.

Maybe you're caching to local process memory? If so then you might be
seeing stale cache entries when a request is routed to a different
process. Use a shared cache instead like memcached.

badnaam

unread,
Aug 31, 2010, 1:47:48 PM8/31/10
to Phusion Passenger Discussions
As I mentioned I do "not" see this with webrick the problem happens
with passenger

On Aug 31, 2:55 am, Anuj Dutta <dutta.a...@googlemail.com> wrote:
> Hello,
>
> Let me rephrase this:
>
> You are experiencing caching issues with webrick? How is it related to
> Passenger?
>
> Anuj
>
> On 31 August 2010 06:47, badnaam <asitkmis...@gmail.com> wrote:
>
>
>
>
>
> > I have posted another question similar to this, which I thought I
> > resolved. But it is coming back with another symptom.
>
> > I am using REE/Passenger/Nginx and have the following in my nginx.conf
>
> > location ~* ^.+.(jpg|jpeg|gif|png|css|js|swf)?([0-9]+)?$ { expires
> > max; passenger_enabled on; }
>
> > Ever since I did this, it seems sometimes, the client gets server with
> > cached pages, like for normal .html.erb pages. So if I go to
> >http://localhost/posts/22I might see the version of post 22 that was
> > last seen for another user. This isn't happening if I run the app on
> > webrick.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Phusion Passenger Discussions" group.
> > To post to this group, send email to phusion-...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > phusion-passen...@googlegroups.com<phusion-passenger%2Bunsu...@googlegroups.com>
> > .

badnaam

unread,
Aug 31, 2010, 1:47:13 PM8/31/10
to Phusion Passenger Discussions
I have not turned on page caching, as far as I can tell. Here is my
development.rb file. I don't see this issue with webrick(at port
3000), only with passenger at port 80.

I am not sure how I can find out if I cam caching to local process
memory, I have not deliberately set anytinig like that.


# Settings specified here will take precedence over those in config/
environment.rb

# In the development environment your application's code is reloaded
on
# every request. This slows down response time but is perfect for
development
# since you don't have to restart the webserver when you make code
changes.
config.cache_classes = false

# Log error messages when you accidentally call methods on nil.
config.whiny_nils = true

# Show full error reports and disable caching
config.action_controller.consider_all_requests_local = true
config.action_view.debug_rjs = true
config.action_controller.perform_caching = false

config.action_mailer.raise_delivery_errors = true
config.action_mailer.delivery_method = :smtp
config.action_mailer.perform_deliveries = true
config.action_mailer.default_url_options = {:host =>
"localhost", :port => "3000"}
config.action_mailer.default_charset = "utf-8"
config.cache_store = :mem_cache_store
config.gem "rails-footnotes"
config.action_controller.page_cache_directory = RAILS_ROOT + "/public/
cache/"
#if defined?(Footnotes)
# Footnotes::Filter.prefix = 'editor://open?url=file://%s&amp;line=
%d&amp;column=%d'
#end


On Aug 31, 3:31 am, Hongli Lai <hon...@phusion.nl> wrote:
> On Tue, Aug 31, 2010 at 11:55 AM, Anuj Dutta <dutta.a...@googlemail.com> wrote:
> > Hello,
> > Let me rephrase this:
> > You are experiencing caching issues with webrick? How is it related to
> > Passenger?
>
> I've never experienced any kinds of caching issues in Phusion Passenger.
>
> Maybe you're caching to local process memory? If so then you might be
> seeing stale cache entries when a request is routed to a different
> process. Use a shared cache instead like memcached.
>
> --
> Phusion | The Computer Science Company
>
> Web:http://www.phusion.nl/
> E-mail: i...@phusion.nl

badnaam

unread,
Sep 1, 2010, 12:36:17 PM9/1/10
to Phusion Passenger Discussions
Folks any thoughts on this?
Reply all
Reply to author
Forward
0 new messages