Hi John! As usual, hugeee thanks for your attention and disposition to help, it's incredibly appreciated.
I managed to work around it by changing the persistence engine to DB instead of FS. I had to modify singlecon.rb for that to work, since rails 2.1.2 doesn't have the "ActiveRecord::Base.connection_pool.checkout" method, so I used "ActiveRecord::Base.connection" instead. At this point I don't know if that might break something, but it has been working fine. Back to the original problem, it seems to be a very hard one to debug, because it doesn't happen at any specific point. Let me explain a little bit further. > Could you be bit more precise ? There is actually no code after this > respond_to in the #create of the controller. So maybe it's inside. > Could the redirect_to :action => 'show' trigger some loop ? > > What happens if you comment out the respond_to block and replace it > with a simple reply like : > > render :text => "ok, it's launched ?" I did that simple render and it actually renders on screen, but the ruby.exe process still goes berserk up to 1.4GB o memory, with its ups and downs until the server cannot handle it anymore and throws the out of memory exception. Even if I comment out the whole response_to and headers['Locations'] block, the memory leaks. It seems to be triggered when the engine is instantiated. Another thing I noticed is that if I start the server, do nothing for a while, and then try to close it, the memory leak still happens. Maybe it has something to do with one of the threads that the engine runs? In debugger mode I listed the threads but the rufus-scheduler and workqueue are shown asleep. Logs also don't seem to help very much. The application log shows nothing unsual at all, and the ruote log show this for a clean server start (no process launch previosly attempted, clean tables): OpenWFE::FsPersistedEngine 's_engine' - build_scheduler() version is 2.0.1 OpenWFE::CacheExpressionStorage 's_expression_storage' - new() size is 5000 OpenWFE::FsPersistedEngine 's_engine' - new() --- engine started --- 54177790 OpenWFE::ExpressionPool 's_expression_pool' - reschedule() initiating... OpenWFE::ExpressionPool 's_expression_pool' - reschedule() done. (took 0.0 ms) and this when I start a server after a failed launch process: OpenWFE::FsPersistedEngine 's_engine' - build_scheduler() version is 2.0.1 OpenWFE::CacheExpressionStorage 's_expression_storage' - new() size is 5000 OpenWFE::FsPersistedEngine 's_engine' - new() --- engine started --- 54205530 OpenWFE::ExpressionPool 's_expression_pool' - reschedule() initiating... OpenWFE::ExpressionPool 's_expression_pool' - reschedule() for (fei 0.9.21 engine C:/kns/public/defs/sequence1.rb Sequence 1 20090514- murenihoza environment 0)... OpenWFE::ExpressionPool 's_expression_pool' - reschedule() done. (took 78.0000686645508 ms) I should point out that neither "ar_workitems" nor the "history" tables show any records, but the work_* folder under root does have data. I also tried to do this on a different Windows machine with no luck. I even tried to run ruote-web2 directly with the enviroment set to use rails 2.1.2, to rule out the possibility of having something to do with my own app. Anyways, now that I was able to run it fine with the DB storage method, maybe you shouldn't bother. Unless any of this info actually gives you an idea of what might be going on :). Sorry for all the trouble caused! Best regards, Freddy. On May 13, 8:21 pm, John Mettraux <[email protected]> wrote: > On Thu, May 14, 2009 at 7:38 AM, Freddy Peña <[email protected]> wrote: > > > After a lot of learning Ruote via ruote-web2, I finally got to the > > point where I'm going to integrate it on my rails 2.1.2 app. > > Hello Freddy, > > at first, about your title "Ruote not running on Rails 2.1.2 ?" > > Ruote[-web] used to work fine on Rails 2.0.x : > > http://github.com/jmettraux/ruote-web/blob/702da35102f5f9d8f8d32ef6d5... > > > What I'm > > doing is progressively taking parts of web2, testing, and fixing any > > incompatibility issues. Definitions works fine now, however, when I > > try to launch a process my server hangs and dies. System memory goes > > up to 1GB and the server throws: > > > [FATAL] failed to allocate memory > > Error in my_thread_global_end(): 1 threads didn't exit > > > Debugging step by step, this happens after the "respond_to" in > > ProcessesController#create. > > Could you be bit more precise ? There is actually no code after this > respond_to in the #create of the controller. So maybe it's inside. > Could the redirect_to :action => 'show' trigger some loop ? > > What happens if you comment out the respond_to block and replace it > with a simple reply like : > > render :text => "ok, it's launched ?" > > > I'm using Windows XP SP2, Ruby 1.8.6, rails 2.1.2 and the latest of > > every rufus/ruote gem and plugin. I think rails 2.1.2 uses its own > > built-in mysql driver. > > > I know it's a lot to ask for help when I'm actually downgrading ruote- > > web2, but upgrading my app to rails 2.3.2 would be far more > > complicated since it's gotten very large, with lots of gems, and my > > team's last option. Any pointer would be greatly appreciated :). > > I understand that you don't want to upgrade. > > Let's progress methodically. Please be not afraid to output statements > to the logger or the console to track what's happening in there (be it > Rails or Ruote). > > Best regards, > > -- > John Mettraux - http://jmettraux.wordpress.com --~--~---------~--~----~------------~-------~--~----~ you received this message because you are subscribed to the "ruote users" group. to post : send email to [email protected] to unsubscribe : send email to [email protected] more options : http://groups.google.com/group/openwferu-users?hl=en -~----------~----~----~----~------~----~------~--~---
