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?
Ezra Zygmuntowicz
2005-Dec-15 19:53 UTC
Re: site takes a while to load after first visit in a while
On Dec 15, 2005, at 11:36 AM, Joe Van Dyk 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 > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > 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 Zygmuntowicz Yakima Herald-Republic WebMaster http://yakimaherald.com 509-577-7732 ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org
Joe Van Dyk
2005-Dec-15 20:20 UTC
Re: site takes a while to load after first visit in a while
On 12/15/05, Ezra Zygmuntowicz <ezra-SD1UcFUIF7QjH4SCZfkgnw@public.gmane.org> wrote:> > On Dec 15, 2005, at 11:36 AM, Joe Van Dyk 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? > > 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 .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.
Phillip Hutchings
2005-Dec-15 20:26 UTC
Re: site takes a while to load after first visit in a while
On 16/12/2005, at 9:20 AM, Joe Van Dyk 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 Hutchings phillip.hutchings-QrR4M9swfipWk0Htik3J/w@public.gmane.org
Ezra Zygmuntowicz
2005-Dec-15 20:26 UTC
Re: site takes a while to load after first visit in a while
On Dec 15, 2005, at 12:20 PM, Joe Van Dyk wrote:> On 12/15/05, Ezra Zygmuntowicz <ezra-SD1UcFUIF7QjH4SCZfkgnw@public.gmane.org> wrote: >> >> On Dec 15, 2005, at 11:36 AM, Joe Van Dyk 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? >> >> 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 . > > 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. >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 Zygmuntowicz Yakima Herald-Republic WebMaster http://yakimaherald.com 509-577-7732 ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org
Joe Van Dyk
2005-Dec-15 22:12 UTC
Re: site takes a while to load after first visit in a while
On 12/15/05, Phillip Hutchings <sitharus-rails-QrR4M9swfipWk0Htik3J/w@public.gmane.org> wrote:> > On 16/12/2005, at 9:20 AM, Joe Van Dyk 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 ;)4 gigabytes. Not sure how much is in use. It''s on one of TxD''s shared servers.