Forum: Ruby on Rails Strange caching? problem

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.
8f6f95c4bd64d5f10dfddfdcd03c19d6?d=identicon&s=25 Rick Denatale (rdenatale)
on 2009-05-26 13:28
(Received via mailing list)
I got up this morning to discover a strange occurrence on my blog
server.

My blog http://talklikeaduck.denhaven2.com/ seems to be serving up a
blank page for JUST the landing page.

The admin pages are fine, if I enter the url of an article page it
comes back fine. But the base url comes back blank.

Tailing the production log indicates that requests to that url aren't
even hitting the rails app.  I've swept the page cache using the typo
admin ui, I've restarted the blog using cap.

The same thing happens with Safari 4, Firefox, and Curl, so it's not a
browser caching issue.

I suspect that Apache and Passenger are not sending the request
through, I restarted apache on the server and still the same thing.

Ideas anyone?

--
Rick DeNatale

Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2009-05-26 13:34
(Received via mailing list)
On May 26, 12:26 pm, Rick DeNatale <rick.denat...@gmail.com> wrote:

> The same thing happens with Safari 4, Firefox, and Curl, so it's not a
> browser caching issue.
>
> I suspect that Apache and Passenger are not sending the request
> through, I restarted apache on the server and still the same thing.
>
> Ideas anyone?

Not so much an idea as what I would look at next; have you tried using
tcpdump (or wireshark, ethereal, etc) to see what the http requests/
responses look like ?

Fred
8f6f95c4bd64d5f10dfddfdcd03c19d6?d=identicon&s=25 Rick Denatale (rdenatale)
on 2009-05-26 13:47
(Received via mailing list)
On Tue, May 26, 2009 at 7:34 AM, Frederick Cheung
<frederick.cheung@gmail.com> wrote:
>
> Not so much an idea as what I would look at next; have you tried using
> tcpdump (or wireshark, ethereal, etc) to see what the http requests/
> responses look like ?

No.  I guess I could set up to do that on the server, but I'm not sure
what to look for, I don't know enough about Passenger to know where
tcp is used between Apache - Passenger and the rails app, I think that
the rails app actually runs in one or more Passenger processes doesn't
it?

--
Rick DeNatale

Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale
Bee69cfed999cd13e3bff73d472a39ee?d=identicon&s=25 Hassan Schroeder (Guest)
on 2009-05-26 14:14
(Received via mailing list)
On Tue, May 26, 2009 at 4:26 AM, Rick DeNatale <rick.denatale@gmail.com>
wrote:

> ..., I restarted apache on the server and still the same thing.

Did you do a restart, or did you stop httpd and use ps to make sure
all threads had exited, then start clean?

If not, I'd try that first.
--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
8f6f95c4bd64d5f10dfddfdcd03c19d6?d=identicon&s=25 Rick Denatale (rdenatale)
on 2009-05-26 14:24
(Received via mailing list)
On Tue, May 26, 2009 at 8:13 AM, Hassan Schroeder
<hassan.schroeder@gmail.com> wrote:
>
> On Tue, May 26, 2009 at 4:26 AM, Rick DeNatale <rick.denatale@gmail.com> wrote:
>
>> ..., I restarted apache on the server and still the same thing.
>
> Did you do a restart, or did you stop httpd and use ps to make sure
> all threads had exited, then start clean?
>
> If not, I'd try that first.

Tried that, no joy.

--
Rick DeNatale

Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale
Bee69cfed999cd13e3bff73d472a39ee?d=identicon&s=25 Hassan Schroeder (Guest)
on 2009-05-26 14:45
(Received via mailing list)
On Tue, May 26, 2009 at 5:23 AM, Rick DeNatale <rick.denatale@gmail.com>
wrote:

>> Did you do a restart, or did you stop httpd and use ps to make sure
>> all threads had exited, then start clean?

> Tried that, no joy.

Ouch. And you're absolutely sure there's no caching appliance
anywhere in the path to your server? Shutting down httpd and
sending a request results in a `no connection` message?

Any recent config changes? System auto-updates?

--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
8f6f95c4bd64d5f10dfddfdcd03c19d6?d=identicon&s=25 Rick Denatale (rdenatale)
on 2009-05-26 14:45
(Received via mailing list)
On Tue, May 26, 2009 at 7:26 AM, Rick DeNatale <rick.denatale@gmail.com>
wrote:
> admin ui, I've restarted the blog using cap.
>
> The same thing happens with Safari 4, Firefox, and Curl, so it's not a
> browser caching issue.
>
> I suspect that Apache and Passenger are not sending the request
> through, I restarted apache on the server and still the same thing.

Okay, I discovered that there was an empty file in public/index.html,
I renamed it and now the root page is back.

Not sure how it got blank. Looks like a bug in typo.


--
Rick DeNatale

Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale
8f6f95c4bd64d5f10dfddfdcd03c19d6?d=identicon&s=25 Rick Denatale (rdenatale)
on 2009-05-26 14:48
(Received via mailing list)
On Tue, May 26, 2009 at 8:44 AM, Hassan Schroeder
<hassan.schroeder@gmail.com> wrote:
> sending a request results in a `no connection` message?
>
> Any recent config changes? System auto-updates?

Nope.

I just posted in reply to my original post that I discovered that
there was an empty index.html in the public directory.  I got rid of
that and the page came back (Typo regenerated it).

So the blog is back but I still don't understand why the cached page got
empty.

--
Rick DeNatale

Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale
8f6f95c4bd64d5f10dfddfdcd03c19d6?d=identicon&s=25 Rick Denatale (rdenatale)
on 2009-05-26 14:51
(Received via mailing list)
On Tue, May 26, 2009 at 8:46 AM, Rick DeNatale <rick.denatale@gmail.com>
wrote:
>> Ouch. And you're absolutely sure there's no caching appliance
>
> So the blog is back but I still don't understand why the cached page got empty.

Actually, I think I figured it out.

A day or so ago, I made a stupid sysop mistake and did a bulk copy
which filled up the Logical Volume where the blog is kept.  I suspect
that Typo tried to refresh that cached file when the disk was full
hence the empty file.

--
Rick DeNatale

Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale
40db9e75b3f5899258e3bdc0c9210154?d=identicon&s=25 Conrad Taylor (conradwt)
on 2009-05-26 14:52
(Received via mailing list)
On Tue, May 26, 2009 at 5:46 AM, Rick DeNatale
<rick.denatale@gmail.com>wrote:

> >> Tried that, no joy.
> there was an empty index.html in the public directory.  I got rid of
> WWR: http://www.workingwithrails.com/person/9021-rick-denatale
> LinkedIn: http://www.linkedin.com/in/rickdenatale
>

If you're caching the index action using caches_page which produces
an index.html in the public directory, then Typo appears to be
overwriting
that version.

-Conrad
2fd0206c71a1b22a9cc6293f38537461?d=identicon&s=25 Cyril Mougel (shingara)
on 2009-05-26 17:27
(Received via mailing list)
Le 26 mai 09 à 14:45, Rick DeNatale a écrit :

>>
>
> Okay, I discovered that there was an empty file in public/index.html,
> I renamed it and now the root page is back.
>
> Not sure how it got blank. Looks like a bug in typo.

It's not a Typo issue. We generate the index.html. We delete it only
if it's Typo to create it. If you create it manually, Typo can't
delete it. We can't assume, all page generate if you don't generate it.

--
Cyril Mougel
http://blog.shingara.fr
This topic is locked and can not be replied to.