Weird Caching Issue


#1

Hey all,

Here’s the issue… I’m not entirely sure it’s even a Cache-related
issue,
but here it goes:

I’ve deployed a Rails app onto a subdomain of my clients site… The
server
is running Apache2, and I’m proxying through to Lighttpd. The issue I’m
having is that I’m able to add content to the site (data exists in the
db),
but viewing pages display NO data at all.

At first I thought it was a browser cache issue… no change. I’ve
tried
restarting both servers, I ran a “rake tmp:cache:clear”… no change.
I’m
at a loss at what could be causing the problem.

The site is supposed to launch in the new couple of days, but at this
point,
it doesn’t look to be going too well.

I’d appreciate any help/insight anyone can provide. If you require any
more
details, please let me know, as I would be more than willing to help you
help me.

Kind regards,
Frank


#2

Could it be a problem with the ENVIRONMENT setting
ie development,production,testing.

Is it looking in the correct database?
Are you getting the SQL written into the logs?
Are there errors or just blank pages or just pages with nothing from the
database?

On Fri, 2006-05-26 at 15:27 -0400, Frank Manno wrote:

At first I thought it was a browser cache issue… no change. I’ve

Kind regards,
Frank


Rails mailing list
removed_email_address@domain.invalid
http://lists.rubyonrails.org/mailman/listinfo/rails

Charlie B.
http://www.recentrambles.com


#3

Charlie,

Essentially, all I get are the proper HTML pages, just without the
content from the DB. I’m assuming the DB it’s looking into is correct
since the content is being added from within the administration
console.

The environment setting is being set in my lighttpd.conf file, though
it’s not explicity set in the environment.rb file (my understanding
was that if its set at the server level, no need to do so in
environment.rb):

    fastcgi.server = (
            ".fcgi" => (
                    "rails" => (
                    "socket" => "/tmp/lighttpd-fcgi.socket",
                    "bin-path" =>

“/var/www/vhosts/kaskademusic.com_rails/public/dispatch.fcgi”,
“bin-environment” => ( “RAILS_ENV” =>
“production” ),
“min-procs” => 2,
“max-procs” => 3,
“idle-timeout” => 120
)
)
)

This is what my production.log file shows when I pull up the page in
question:

Processing TourController#index (for 206.223.166.195 at 2006-05-26
12:44:01) [GET]
Session ID: b57e2263d8a348d9022230b6d14448d6
Parameters: {“action”=>“index”, “controller”=>“tour”}
Rendering actionlistlayoutfalse within layouts/application
Rendering tour/list
Completed in 0.00857 (116 reqs/sec) | Rendering: 0.00562 (65%) | DB:
0.00095 (11%) | 200 OK [http://dev.kaskademusic.com/tour]

I’d appreciate any further help you can provide.

Thanks,
Frank


#4

Just to be safe comment out the lines in your database.yml file so that
the only database listed is the one you’re trying to access. I’m
assuming this would be your production database.

On Fri, 2006-05-26 at 15:48 -0400, Frank Manno wrote:

environment.rb):
“max-procs” => 3,
Parameters: {“action”=>“index”, “controller”=>“tour”}
Frank

Are there errors or just blank pages or just pages with nothing from the database?

 Frank

removed_email_address@domain.invalid
http://lists.rubyonrails.org/mailman/listinfo/rails


Rails mailing list
removed_email_address@domain.invalid
http://lists.rubyonrails.org/mailman/listinfo/rails

Charlie B.
http://www.recentrambles.com


#5

Still no change…

One thing I noticed in the “production.rb” file within
config/environments
is this line:

“config.action_controller.perform_caching”

which is set to true. Could this have something to do with it?

I’m at a loss at what would be causing this issue…

Another thing I noticed is that in the Apache config file, FastCGI is
being
loaded… Should I remove that? Could that be the cause for any of
this?

Thanks again,
Frank


#6

Charlie,

Here’s the weird thing… I can’t seem to locate any cached files…
I’ve
checked the public folder, as well as the /tmp folder. All I see in
/tmp
are ruby session files (which I’ve removed), lighttpd pid, fcgi pid and
some
other session files (I’m assuming system session files).

I’ve changed that line in production.rb, and still no change…

/me = confused… ?!


#7

Yes, if you have the page cached before you added your products it will
continue to display the empty pages. To be safe, make sure caching is
turned off, clear out the cache folder. This could be under public or
tmp or anywhere you set it to be. Also, remember to restart the server
after every change.

On Fri, 2006-05-26 at 16:01 -0400, Frank Manno wrote:

    > Charlie,
    > 
    >                         "idle-timeout" => 120
    > Rendering actionlistlayoutfalse within layouts/application
    > 
    > >
    > >      I've deployed a Rails app onto a subdomain of my clients site... The server is running Apache2, and I'm proxying through to Lighttpd.  The issue I'm having is that I'm able to add content to the site (data exists in the db), but viewing pages display NO data at all.
    > >      Kind regards,
    > > _______________________________________________
    > http://lists.rubyonrails.org/mailman/listinfo/rails
    http://lists.rubyonrails.org/mailman/listinfo/rails

Rails mailing list
removed_email_address@domain.invalid
http://lists.rubyonrails.org/mailman/listinfo/rails

Charlie B.
Programmer
Castle Branch Inc.


#8

Hmmm… There’s no “tmp” directory within rails_root… How could that
be?
Btw, I’m running 1.1.2… in case that helps.

Thanks,
Frank


#9

I’m not sure why you don’t have it. I just started a fresh app and
these are the directorys that were created. Maybe you started your app
with something other than rails 1.1.2. Try loading up your app with
webbrick and see what you see

vendor
tmp
test
script
public
log
lib
doc
db
config
components
app

Frank Manno wrote:

Hmmm… There’s no “tmp” directory within rails_root… How could that
be?
Btw, I’m running 1.1.2… in case that helps.

Thanks,
Frank


#10

I meant to check your rails_root/tmp. ie /var/www/your_app/tmp/cache/
I believe rails 1.1 puts the cache files there.

On Fri, 2006-05-26 at 16:16 -0400, Frank Manno wrote:

/me = confused… ?!
Charlie B.
http://www.recentrambles.com


#11

Oh damn!! I just realized right after reading this… I created the
app on my system using Rails 1.1… Whereas the server has 1.1.2…

I’m guessing I should try upgrading? I’ve never done it before…
What’s the best way to go about doing so? Do I need to be mindful or
anything?

Do you think this may be the cause of the problem?

Thanks,
Frank


#12

I don’t think that is your issue, but to be safe, in your app on your
system run “rake freeze_edge”. This will put rails into your vendor
folder so that whatever version is on the server won’t matter. Then re
upload your version to the server. Can you post access the blank page
and then post what is written to your production log.

Frank Manno wrote:

Oh damn!! I just realized right after reading this… I created the
app on my system using Rails 1.1… Whereas the server has 1.1.2…

I’m guessing I should try upgrading? I’ve never done it before…
What’s the best way to go about doing so? Do I need to be mindful or
anything?

Do you think this may be the cause of the problem?

Thanks,
Frank