Bryan Corey
2007-Jun-04 23:55 UTC
BackgroundRB process dies before finishing or tossing error
Can someone PLEASE help me. BackgroundRB doesn''t finish its process, nor does it log any errors, even if I place the section of code, initializing a new Photo object, within a begin / rescue block. Nothing happens short of the process dying, leaving me with temp files and backgroundrbunix files in my ///tmp folder. What is going on here? I''m not near my memory cap, and sometimes it works... so it can''t just be a code issue thats erroring out all the time. Can someone please shed some light on this for me? Thanks. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
MichaelLatta
2007-Jun-05 00:18 UTC
Re: BackgroundRB process dies before finishing or tossing error
It sounds to me like the C code is crashing the VM process that BackgroundRB is running in. If this is intermittent then it may be data specific to what you are working with. It sounds like you need to do some additional debugging of the BackgroundRB code being executed. Put in tracing of basic execution paths and input data so you can narrow down where the crashes are happening. Michael On Jun 4, 4:55 pm, Bryan Corey <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Can someone PLEASE help me. BackgroundRB doesn''t finish its process, nor > does it log any errors, even if I place the section of code, > initializing a new Photo object, within a begin / rescue block. Nothing > happens short of the process dying, leaving me with temp files and > backgroundrbunix files in my ///tmp folder. What is going on here? I''m > not near my memory cap, and sometimes it works... so it can''t just be a > code issue thats erroring out all the time. Can someone please shed some > light on this for me? Thanks. > > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jodi Showers
2007-Jun-05 00:44 UTC
Re: BackgroundRB process dies before finishing or tossing error
On 4-Jun-07, at 8:18 PM, MichaelLatta wrote:> > It sounds to me like the C code is crashing the VM process that > BackgroundRB is running in. If this is intermittent then it may be > data specific to what you are working with. It sounds like you need > to do some additional debugging of the BackgroundRB code being > executed. Put in tracing of basic execution paths and input data so > you can narrow down where the crashes are happening. > > Michael > > > On Jun 4, 4:55 pm, Bryan Corey <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > wrote: >> Can someone PLEASE help me. BackgroundRB doesn''t finish its >> process, nor >> does it log any errors, even if I place the section of code, >> initializing a new Photo object, within a begin / rescue block. >> Nothing >> happens short of the process dying, leaving me with temp files and >> backgroundrbunix files in my ///tmp folder. What is going on here? >> I''m >> not near my memory cap, and sometimes it works... so it can''t just >> be a >> code issue thats erroring out all the time. Can someone please >> shed some >> light on this for me? Thanks. >> >> -- >> Posted viahttp://www.ruby-forum.com/.Following on Michael''s suggestion, I''d implore you to make sure your logic is firmly located within the model (or lib), and then write a flurry of tests. Once you''ve killed every last bug, then you''ll likely have more luck tracking down the problem. I''ve only had two problems with Backgroundrb so far that weren''t application specific - very short running processes can upset brb, plus I seen ''cannot find slave socket'' that will basically halt brb. Both the above flood background_server.log. Good tests have the key otherwise. Jodi --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Bryan Corey
2007-Jun-05 16:12 UTC
Re: BackgroundRB process dies before finishing or tossing er
Jodi Showers wrote:> On 4-Jun-07, at 8:18 PM, MichaelLatta wrote: > >> >>> not near my memory cap, and sometimes it works... so it can''t just >>> be a >>> code issue thats erroring out all the time. Can someone please >>> shed some >>> light on this for me? Thanks. >>> >>> -- >>> Posted viahttp://www.ruby-forum.com/. > > Following on Michael''s suggestion, I''d implore you to make sure your > logic is firmly located within the model (or lib), and then write a > flurry of tests. > > Once you''ve killed every last bug, then you''ll likely have more luck > tracking down the problem. > > I''ve only had two problems with Backgroundrb so far that weren''t > application specific - very short running processes can upset brb, > plus I seen ''cannot find slave socket'' that will basically halt brb. > > Both the above flood background_server.log. > > Good tests have the key otherwise. > > JodiJodi and Michael... The thing is I am using the same exact input for both the failing and passing executions, so the intermittentcy really worries me. I guess I''ll write all the tests and whatnot for everything I can possibly think of and go from there, but I don''t understand why consistently the first attempt will always fail using backgroundrb but then following attempts within a few minutes work just fine. I also don''t understand why my code doesn''t throw any errors in development mode locally and works flawlessly every time. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Bryan Corey
2007-Jun-05 16:13 UTC
Re: BackgroundRB process dies before finishing or tossing er
Bryan Corey wrote:> Jodi Showers wrote: >> On 4-Jun-07, at 8:18 PM, MichaelLatta wrote: >> >>> >>>> not near my memory cap, and sometimes it works... so it can''t just >>>> be a >>>> code issue thats erroring out all the time. Can someone please >>>> shed some >>>> light on this for me? Thanks. >>>> >>>> -- >>>> Posted viahttp://www.ruby-forum.com/. >> >> Following on Michael''s suggestion, I''d implore you to make sure your >> logic is firmly located within the model (or lib), and then write a >> flurry of tests. >> >> Once you''ve killed every last bug, then you''ll likely have more luck >> tracking down the problem. >> >> I''ve only had two problems with Backgroundrb so far that weren''t >> application specific - very short running processes can upset brb, >> plus I seen ''cannot find slave socket'' that will basically halt brb. >> >> Both the above flood background_server.log. >> >> Good tests have the key otherwise. >> >> Jodi > > Jodi and Michael... > > The thing is I am using the same exact input for both the failing and > passing executions, so the intermittentcy really worries me. I guess > I''ll write all the tests and whatnot for everything I can possibly think > of and go from there, but I don''t understand why consistently the first > attempt will always fail using backgroundrb but then following attempts > within a few minutes work just fine. I also don''t understand why my code > doesn''t throw any errors in development mode locally and works > flawlessly every time.Also, it always fails when I do Photo.new in my backgroundrb worker code. Always the same input, sometimes it works, sometimes it seems like it times-out or something. I put it in a begin / rescue block and never get the rescue code to run so another reason I don''t think it''s an exception causing my issues. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jordi Bunster
2007-Jun-05 17:41 UTC
Re: BackgroundRB process dies before finishing or tossing error
On Jun 4, 2007, at 8:44 PM, Jodi Showers wrote:> On 4-Jun-07, at 8:18 PM, MichaelLatta wrote: > >> It sounds to me like the C code is crashing the VM process that >> BackgroundRB is running in. If this is intermittent then it may be >> data specific to what you are working with. It sounds like you need >> to do some additional debugging of the BackgroundRB code being >> executed. Put in tracing of basic execution paths and input data so >> you can narrow down where the crashes are happening.I have the same *exact* problem. The ''ruby'' processes don''t die, MiddleMan''s jobs.keys still has the key I passed, yet, execution stops. I''ve narrowed the problem to one of my models, where I do: self.connection.execute(sql_string) Changing self.connection to ActiveRecord::Base.connection doesn''t fix it, disabling the enable_concurrency = true inside the Rails worker class doesn''t fix it either. It''s very puzzling. -- Jordi --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jodi Showers
2007-Jun-05 17:48 UTC
Re: BackgroundRB process dies before finishing or tossing er
On 5-Jun-07, at 12:13 PM, Bryan Corey wrote:> > Bryan Corey wrote: >> Jodi Showers wrote: >>> On 4-Jun-07, at 8:18 PM, MichaelLatta wrote: >>> >>>> >>>>> not near my memory cap, and sometimes it works... so it can''t just >>>>> be a >>>>> code issue thats erroring out all the time. Can someone please >>>>> shed some >>>>> light on this for me? Thanks. >>>>> >>>>> -- >>>>> Posted viahttp://www.ruby-forum.com/. >>> >>> Following on Michael''s suggestion, I''d implore you to make sure your >>> logic is firmly located within the model (or lib), and then write a >>> flurry of tests. >>> >>> Once you''ve killed every last bug, then you''ll likely have more luck >>> tracking down the problem. >>> >>> I''ve only had two problems with Backgroundrb so far that weren''t >>> application specific - very short running processes can upset brb, >>> plus I seen ''cannot find slave socket'' that will basically halt brb. >>> >>> Both the above flood background_server.log. >>> >>> Good tests have the key otherwise. >>> >>> Jodi >> >> Jodi and Michael... >> >> The thing is I am using the same exact input for both the failing and >> passing executions, so the intermittentcy really worries me. I guess >> I''ll write all the tests and whatnot for everything I can possibly >> think >> of and go from there, but I don''t understand why consistently the >> first >> attempt will always fail using backgroundrb but then following >> attempts >> within a few minutes work just fine. I also don''t understand why >> my code >> doesn''t throw any errors in development mode locally and works >> flawlessly every time. > > > Also, it always fails when I do Photo.new in my backgroundrb worker > code. Always the same input, sometimes it works, sometimes it seems > like > it times-out or something. I put it in a begin / rescue block and > never > get the rescue code to run so another reason I don''t think it''s an > exception causing my issues. >Micahel, can you post your worker code? otherwise, I''d separate the possibilities by running that exact code inside a simple .rb script - with a loop and sleep. a thought: does do_work have a self.delete ? Cheers, Jodi General Partner The nNovation Group inc. www.nnovation.ca/blog --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Bryan Corey
2007-Jun-05 18:47 UTC
Re: BackgroundRB process dies before finishing or tossing er
Jodi Showers wrote:> On 5-Jun-07, at 12:13 PM, Bryan Corey wrote: > >>>>>> light on this for me? Thanks. >>>> >>> Jodi and Michael... >>> my code >> exception causing my issues. >> > > > Micahel, > > can you post your worker code? > > otherwise, I''d separate the possibilities by running that exact code > inside a simple .rb script - with a loop and sleep. > > a thought: does do_work have a self.delete ? > > Cheers, > Jodi > General Partner > The nNovation Group inc. > www.nnovation.ca/blogUpdate for you guys. Just before the processes die they go into a D state. I have setup a begin / rescue clause around the Photo.new method as listed below, but nothing ever gets logged, which leads me to believe I am hitting some sort of other failure, or some time-out or something. begin logger.info("PhotoProcessorWorker do work -- #{self.jobkey} | #{user.login} | Initialized New Photo") if photo = Photo.new(photoparams) rescue Exception => prob logger.info("PhotoProcessorWorker do work -- #{self.jobkey} | #{user.login} | #{prob.inspect}") end -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jodi Showers
2007-Jun-05 19:34 UTC
Re: BackgroundRB process dies before finishing or tossing er
On 5-Jun-07, at 2:47 PM, Bryan Corey wrote:> > Jodi Showers wrote: >> On 5-Jun-07, at 12:13 PM, Bryan Corey wrote: >> >>>>>>> light on this for me? Thanks. >>>>> >>>> Jodi and Michael... >>>> my code >>> exception causing my issues. >>> >> >> >> Micahel, >> >> can you post your worker code? >> >> otherwise, I''d separate the possibilities by running that exact code >> inside a simple .rb script - with a loop and sleep. >> >> a thought: does do_work have a self.delete ? >> >> Cheers, >> Jodi >> General Partner >> The nNovation Group inc. >> www.nnovation.ca/blog > > > Update for you guys. Just before the processes die they go into a D > state. I have setup a begin / rescue clause around the Photo.new > method > as listed below, but nothing ever gets logged, which leads me to > believe > I am hitting some sort of other failure, or some time-out or > something. > > begin > logger.info("PhotoProcessorWorker do work -- #{self.jobkey} | > #{user.login} | Initialized New Photo") if photo > Photo.new(photoparams) > rescue Exception => prob > logger.info("PhotoProcessorWorker do work -- #{self.jobkey} | > #{user.login} | #{prob.inspect}") > end > > > --Michael - I don''t see a self.delete Plus it''s possible your rescue is firing an exception. I suggest you output text that can''t crash - then introduce vars slowly Jodi --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---