Forum: Ruby on Rails Performance profiling & routes

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.
F29d9f9b8bbf4ffbe09b786d1a800560?d=identicon&s=25 Tim Riley (Guest)
on 2006-02-09 04:08
(Received via mailing list)
Hi all,

With a rails app running under lighttpd, we've recently stopped using
lighttpd's URL rewriting in favour of letting Rails' routes do their
job.

However, under proper testing, we now see the application slowing down
after
a period of time (a couple of days); pages take increasingly longer to
load
over time.  This is fixed by a lighttpd restart.

Could this performance degredation have anything to do with the use of
the
routes (we're just using the default set)?  If not, can anyone offer any
pointers about good ways to track down performance issues in a Rails
app?

Please let me know if you need any more info.

Thanks much for your help,
 - Tim
59de94a56fd2c198f33d9515d1c05961?d=identicon&s=25 Tom Mornini (Guest)
on 2006-02-09 07:13
(Received via mailing list)
How is the machine's health when the application slows down?

I don't have extensive experience with production Rails apps, but
there seems to be a clear pattern of ever increasing memory usage
causing machines to being swapping.

There are some good emails in the archive about how to force
Ruby garbage collection. Perhaps you should incorporate forced
collection into your application...

--
-- Tom Mornini
132a94ca65959bda6c74fae54bff2425?d=identicon&s=25 Ezra Zygmuntowicz (Guest)
on 2006-02-09 17:48
(Received via mailing list)
Also make certain that you are running in production and not
development mode(i'm sure you did this already). Also what kind of
rails app is it? Does it use RMagick at all? Other extensions?

	I don't think that routes are causing the problem especially if you
are just using the defaults. I have rails apps running on lighttpd/
fcgi for months without reboots that are stable in their memory
consumption. But I have other apps that use RMagick heavily that
would steadily increase in memory usage.

	With a little more info I might be able to help more? Does the app
just get slower or does the memory usage grow? Also have you
benchmarked the app after a restart and then when it gets slow?
Sometime perceptions can be wrong. Also, what amount of traffic does
the site get? Rails apps that run on fcgi and end up stiing idle for
hours ata time can be slow to start again because the fcgi processes
get paged out of memory. If this is the case I have solved it by
using wget and a cron job to hit the site every 5 minutes to keep the
fcgi's warmed up.

Cheers-
-Ezra


On Feb 8, 2006, at 10:13 PM, Tom Mornini wrote:

> --
>>
>> Please let me know if you need any more info.
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>

-Ezra Zygmuntowicz
Yakima Herald-Republic
WebMaster
http://yakimaherald.com
509-577-7732
ezra@yakima-herald.com
This topic is locked and can not be replied to.