Cameron Booth
2006-Oct-18 21:29 UTC
[Backgroundrb-devel] Memory staying high even after calling MiddleMan.gc!(Time.now)
Hi there, I''m just implementing backgroundrb to see if I can offload some "processor intensive" areas of my rails app (generating PDFs with lots of imagery in them, using rFPDF and rMagick as well). So far I''ve been able to figure it out fairly quickly....it''s a pretty cool tool! Some questions though: First: I''m running the basic cron-job script to call GC every few minutes via cron, and generally while memory usage shoots up when I''m processing, shortly after it drops back down (base level is about 20Mb). However, in some cases during my testing (trying to hit it many times, etc), it seems like it gets stuck at higher memory usage (like 120Mb!!). The cron job seems to do nothing to help Second: What are people''s experiences running 2 instances on the same box? I have a development site, and the live site running on the same box. Do I have to have them run drb on separate ports (by editing the port # on deploy via Capistrano?), or can it run in both places on the same port, but with a different environment? Thanks in advance!! Cameron
Ezra Zygmuntowicz
2006-Oct-19 00:15 UTC
[Backgroundrb-devel] Memory staying high even after calling MiddleMan.gc!(Time.now)
Hi~ On Oct 18, 2006, at 2:29 PM, Cameron Booth wrote:> Hi there, > > I''m just implementing backgroundrb to see if I can offload some > "processor intensive" areas of my rails app (generating PDFs with > lots of imagery in them, using rFPDF and rMagick as well). > > So far I''ve been able to figure it out fairly quickly....it''s a > pretty cool tool! > > Some questions though: > > First: > > I''m running the basic cron-job script to call GC every few minutes > via cron, and generally while memory usage shoots up when I''m > processing, shortly after it drops back down (base level is about > 20Mb). However, in some cases during my testing (trying to hit it > many times, etc), it seems like it gets stuck at higher memory usage > (like 120Mb!!). The cron job seems to do nothing to helpWithout seeing what you are doing in the worker its hard to say what the problem is. My drb servers stay pretty stable/ But the new release will fix a bunch of things and make the entire system much more robust. skaar has stepped up to the plate and is working hard on the new release so we hope to have it out soon.> > Second: > > What are people''s experiences running 2 instances on the same box? I > have a development site, and the live site running on the same box. > Do I have to have them run drb on separate ports (by editing the port > # on deploy via Capistrano?), or can it run in both places on the > same port, but with a different environment?\You will need a separate port for each drb server and environment. So one for dev and one for prod on diff ports.> > > Thanks in advance!! > > CameronCheers- -- Ezra Zygmuntowicz -- Lead Rails Evangelist -- ez at engineyard.com -- Engine Yard, Serious Rails Hosting -- (866) 518-YARD (9273)