# Site takes a while to load after first visit in a while

**URL:** <https://www.ruby-forum.com/t/site-takes-a-while-to-load-after-first-visit-in-a-while/50380>\
**Category:** Rails\
**Created:** [December 15, 2005, 8:37pm UTC](https://www.ruby-forum.com/t/site-takes-a-while-to-load-after-first-visit-in-a-while/50380 "2005-12-15T20:37:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![joe-dumoulin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9dc877/32.png) [@joe-dumoulin](https://www.ruby-forum.com/u/joe-dumoulin)\
**Post date:** [December 15, 2005, 8:37pm UTC](https://www.ruby-forum.com/t/site-takes-a-while-to-load-after-first-visit-in-a-while/50380/1 "2005-12-15T20:37:37Z")

</div>

Using lighttpd + fcgi to power a site. When no one has accessed it in  
a while, the first visit to the page takes a while to load up. Then  
subsequent visits are fairly fast.

Any ideas on how to fix it?

---

<div class="post-metadata">

**Author:** ![joe-dumoulin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9dc877/32.png) [@joe-dumoulin](https://www.ruby-forum.com/u/joe-dumoulin)\
**Post date:** [December 15, 2005, 8:58pm UTC](https://www.ruby-forum.com/t/site-takes-a-while-to-load-after-first-visit-in-a-while/50380/2 "2005-12-15T20:58:52Z")

</div>

On Dec 15, 2005, at 11:36 AM, Joe Van D. wrote:

> Using lighttpd + fcgi to power a site. When no one has accessed it in  
> a while, the first visit to the page takes a while to load up. Then  
> subsequent visits are fairly fast.
> 
> Any ideas on how to fix it?
> 
> * * *
> 
> Rails mailing list  
> removed\_email\_address@domain.invalid  
> [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

Joe-

```
I have seen this problem in an older version of lighty and the way I

```

solved it is kinda kludgy but it works well. Just make a cron job to  
fetch a page every so often and send the results to /dev/null .

Cheers-

-Ezra Z.  
Yakima Herald-Republic  
WebMaster  
[http://yakimaherald.com](http://yakimaherald.com)  
509-577-7732  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![joe-dumoulin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9dc877/32.png) [@joe-dumoulin](https://www.ruby-forum.com/u/joe-dumoulin)\
**Post date:** [December 15, 2005, 9:23pm UTC](https://www.ruby-forum.com/t/site-takes-a-while-to-load-after-first-visit-in-a-while/50380/3 "2005-12-15T21:23:05Z")

</div>

On 12/15/05, Ezra Z. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> solved it is kinda kludgy but it works well. Just make a cron job to  
> fetch a page every so often and send the results to /dev/null .

Here’s what I’m using:

joevd@bidwell$ lighttpd -v

lighttpd-1.4.8 (ssl) - a light and fast webserver  
Build-Date: Nov 26 2005 01:11:05

Seems pretty recent to me.

---

<div class="post-metadata">

**Author:** ![joe-dumoulin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9dc877/32.png) [@joe-dumoulin](https://www.ruby-forum.com/u/joe-dumoulin)\
**Post date:** [December 15, 2005, 9:32pm UTC](https://www.ruby-forum.com/t/site-takes-a-while-to-load-after-first-visit-in-a-while/50380/4 "2005-12-15T21:32:32Z")

</div>

On Dec 15, 2005, at 12:20 PM, Joe Van D. wrote:

> > 
> 
> Build-Date: Nov 26 2005 01:11:05
> 
> Seems pretty recent to me.

Well yep thats the latest. I used to have the same problem on 1.3.16  
or something and the earliest 1.4.x version. biut I haven’t had the  
problem or been able to reproduce it recently.

Cheers-  
-Ezra Z.  
Yakima Herald-Republic  
WebMaster  
[http://yakimaherald.com](http://yakimaherald.com)  
509-577-7732  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![joe-dumoulin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9dc877/32.png) [@joe-dumoulin](https://www.ruby-forum.com/u/joe-dumoulin)\
**Post date:** [December 15, 2005, 11:15pm UTC](https://www.ruby-forum.com/t/site-takes-a-while-to-load-after-first-visit-in-a-while/50380/5 "2005-12-15T23:15:52Z")

</div>

On 12/15/05, Phillip H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > Seems pretty recent to me.
> 
> How much RAM does the machine have and how much of it is used? Rails  
> apps sit idle when they’re not being used, so the OS might well swap  
> it all out to disk. I see that a lot on my old test machine 😉

4 gigabytes. Not sure how much is in use. It’s on one of TxD’s shared  
servers.

---

<div class="post-metadata">

**Author:** ![joe-dumoulin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9dc877/32.png) [@joe-dumoulin](https://www.ruby-forum.com/u/joe-dumoulin)\
**Post date:** [December 15, 2005, 9:29pm UTC](https://www.ruby-forum.com/t/site-takes-a-while-to-load-after-first-visit-in-a-while/50380/6 "2005-12-15T21:29:31Z")

</div>

On 16/12/2005, at 9:20 AM, Joe Van D. wrote:

> Here’s what I’m using:
> 
> joevd@bidwell$ lighttpd -v
> 
> lighttpd-1.4.8 (ssl) - a light and fast webserver  
> Build-Date: Nov 26 2005 01:11:05
> 
> Seems pretty recent to me.

How much RAM does the machine have and how much of it is used? Rails  
apps sit idle when they’re not being used, so the OS might well swap  
it all out to disk. I see that a lot on my old test machine 😉

–  
Phillip H.  
removed\_email\_address@domain.invalid
