weired problem with periodically_call_remote

Can any one tell me why i get such large number of POST messages to the WEBBRICK...

It is crashing my WINDOWS within 5 minutes.

I am trying to make a portlet that will periodically refresh the stock quotes. The quotes are arranged in atable and pulled from mysql database .

I have a controller(mainpage_controller.rb)

Can any one tell me why i get such large number of POST messages to the WEBBRICK...

i started at 11:56:52 at 11:57:54 i got the first POST at 11:58:54 & 11:58:55 I got 2 POST <<<<<<<<<<<<< WHY??? at 11:59:54 , 11:59:55,11:59:55,11:59:55 i got 4 POST <<<<<<<<<<<<<WHY???

As a programmer, upon seeing a doubling behaviour like this, you should immediately have alarm bells going off in your head that scream 'recursion!' Before even looking at your code, you should be able to tell what the problem is based on the behaviour, but let's take a look at the code anyway (snipped to show the relevant lines):

my view ( index.rhtml) <%= render :partial => "ticker_box",:layout => false %>

my partial (_ticker_box.rhtml) <%= periodically_call_remote( :update => "myinfobox",:frequency => 60,:url => { :action => "index" } ) %>

index.rhtml is including a partial which updates part of the page with index, which includes a partial, which updates part of its page with index... Can you see where this is going? :slight_smile: This is known as mutual recursion.

It is crashing my WINDOWS within 5 minutes.

Do you mean your browser windows? After 5 minutes, it should still only be around 2^4 requests -- if this is crashing Windows, you probably have other issues with your OS.

HTH,

J.

Thanks I could get rid of the issue by putting the periodically_call_remote in the index.rhtml .

Regards

r