AJAX burning up the cpu

I am using lighttpd to serve up pages for my rails app and one of my
actions uses two pieces of AJAX code. Both are calls to periodically
call remote, but to two different actions that simply update a status
and message field on the page. When the AJAX code is present in the page
and even just one person is viewing the page the instace of
dispatch.fcgi on the server starts using 99.9% of the cpu even with 10
seconds as the frequency for each periodic call. When I remove the AJAX
code and look at the page dispatch.fcgi briefly takes up 20-30% of the
cpu then goes back down to 0% once the page has loaded. So, my question
is, is there any reason for this to be happening? The actions that are
being called simply find an object from the database and render a status
message contained in the object, nothing too fancy. Does periodically
call remote normally do this? Or do I just really need to get new
hardware?

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