Could this route be invoking the profiler somehow?

Hi All,

I posted a while back about how my app gets really slow after a while
and dies. When I kill Mongrel, I get a trace that looks like it came
out of the ruby profiler. (see my earlier post if interested:
http://groups.google.com/group/rubyonrails-talk/browse_frm/thread/da1523ccbc1547ce
)

What dawned on me today was that the page that seems to set off this
slowness happens to be the user profile page. Maybe that’s a
coincidence… but maybe not.

I can load the user profile page thousands of times in a functional test
with no issues, but on a real server it crawls (7-10 seconds, eventually
killing the server). I’m wondering if that’s because in the real
environment it’s invoking the routes, and the fact that my route has the
word “profile” in it could somehow be invoking the profiler. My route
looks like this:

map.connect ‘/person/:id/section/profile’, :controller =>
‘mycontroller’, :action => ‘user_profile’

Is it possible that this is somehow invoking the profiler? It seems
impossible, but admittedly I don’t know the ins and outs of routes.

I’m having difficulties troubleshooting this because it’s not
reproducible in the test environment. Any ideas?

Many thanks,
Tom

Hi!

On Oct 28, 2006, at 5:04 PM, Tom L. wrote:

What dawned on me today was that the page that seems to set off this
word “profile” in it could somehow be invoking the profiler. My route

Many thanks,
Tom

Hey Tom-

That could be possible. What version of rails are you running? Also

what happens if you rename profile to profile1 temporarliy? Does that
fix the issue?

Cheers-

– Ezra Z.
– Lead Rails Evangelist
[email protected]
– Engine Y., Serious Rails Hosting
– (866) 518-YARD (9273)

Ezra Z. wrote:

Hi!

On Oct 28, 2006, at 5:04 PM, Tom L. wrote:

What dawned on me today was that the page that seems to set off this
word “profile” in it could somehow be invoking the profiler. My route

Many thanks,
Tom

Hey Tom-

That could be possible. What version of rails are you running? Also
what happens if you rename profile to profile1 temporarliy? Does that
fix the issue?

Hey Ezra,

Both of your questions were right on target. I was using rails 1.1.2,
which I remember had some security problems with routes loading things
which were later resolved - I bet I hit an incarnation of that.
Renaming the path in my action to ‘aprofile’ made the problem
disappear… as did simply upgrading to 1.1.6.

Thank you!
Tom

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs