I have this recurrent problem that I just can''t figure out. On several parts of the application when active record is executing some query it throws a ActiveRecord::StatementInvalid exit like this: A ActiveRecord::StatementInvalid occurred in someapplication#some_action: SystemExit: exit: SELECT * FROM project WHERE (project.`id` = 99999) /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract_adapter.rb:128:in `log'' The thing is that the next time you try the same action, it works fine, also if you run that query directly in a console or any query browser it returns a valid result. The occurrence is very random. Any help or comments are greatly appreciated. -- 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 -~----------~----~----~----~------~----~------~--~---
Frederick Cheung
2008-Oct-28 19:59 UTC
Re: Random SystemExit. ActiveRecord::StatementInvalid
On Oct 28, 7:21 pm, Carlos Garcia <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> I have this recurrent problem that I just can''t figure out. On several > parts of the application when active record is executing some query it > throws a ActiveRecord::StatementInvalid exit like this: >I may be misremembering, but I have a vague idea that this can happen if the mongrel/whatever is sent a TERM signal. How is your app deployed? (in particular I seem to remember apache being a little enthusiastic about killing fastcgi instances) Fred> A ActiveRecord::StatementInvalid occurred in > someapplication#some_action: > > SystemExit: exit: SELECT * FROM project WHERE (project.`id` = 99999) > /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connectio n_adapters/abstract_adapter.rb:128:in > `log'' > > The thing is that the next time you try the same action, it works fine, > also if you run that query directly in a console or any query browser it > returns a valid result. The occurrence is very random. > > Any help or comments are greatly appreciated. > -- > 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Frederick Cheung wrote:> On Oct 28, 7:21�pm, Carlos Garcia <rails-mailing-l...@andreas-s.net> > wrote: >> I have this recurrent problem that I just can''t figure out. On several >> parts of the application when active record is executing some query it >> throws a ActiveRecord::StatementInvalid exit like this: >> > I may be misremembering, but I have a vague idea that this can happen > if the mongrel/whatever is sent a TERM signal. How is your app > deployed? (in particular I seem to remember apache being a little > enthusiastic about killing fastcgi instances) > > FredWe deploy to virtual hosts using apache on ubuntu. -- 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Frederick Cheung
2008-Oct-28 21:01 UTC
Re: Random SystemExit. ActiveRecord::StatementInvalid
On 28 Oct 2008, at 20:22, Carlos Garcia <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org > wrote:> > Frederick Cheung wrote: >> On Oct 28, 7:21�pm, Carlos Garcia <rails-mailing-l...@andreas-s.n >> et> >> wrote: >>> I have this recurrent problem that I just can''t figure out. On >>> several >>> parts of the application when active record is executing some >>> query it >>> throws a ActiveRecord::StatementInvalid exit like this: >>> >> I may be misremembering, but I have a vague idea that this can happen >> if the mongrel/whatever is sent a TERM signal. How is your app >> deployed? (in particular I seem to remember apache being a little >> enthusiastic about killing fastcgi instances) >> >> Fred > > We deploy to virtual hosts using apache on ubuntu.But what sits behind that? Mod_rails, mongrel, fastcgi, scgi?> > -- > 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Frederick Cheung wrote:> On 28 Oct 2008, at 20:22, Carlos Garcia > <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org > > wrote: > >>>> >>> I may be misremembering, but I have a vague idea that this can happen >>> if the mongrel/whatever is sent a TERM signal. How is your app >>> deployed? (in particular I seem to remember apache being a little >>> enthusiastic about killing fastcgi instances) >>> >>> Fred >> >> We deploy to virtual hosts using apache on ubuntu. > > But what sits behind that? Mod_rails, mongrel, fastcgi, scgi?hehe, sorry, fastcgi -- 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 -~----------~----~----~----~------~----~------~--~---
Frederick Cheung
2008-Oct-28 21:40 UTC
Re: Random SystemExit. ActiveRecord::StatementInvalid
On Oct 28, 9:22 pm, Carlos Garcia <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Frederick Cheung wrote: > > On 28 Oct 2008, at 20:22, Carlos Garcia > > <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org > > > wrote: > > >>> I may be misremembering, but I have a vague idea that this can happen > >>> if the mongrel/whatever is sent a TERM signal. How is your app > >>> deployed? (in particular I seem to remember apache being a little > >>> enthusiastic about killing fastcgi instances) > > >>> Fred > > >> We deploy to virtual hosts using apache on ubuntu. > > > But what sits behind that? Mod_rails, mongrel, fastcgi, scgi? > > hehe, sorry, fastcgiSo as I was saying, I remember apache killing off fastcgi instances. I think it logs (or can be told to log) when it does this. If you can correlate this with when you get the errors then you''ll have found your cause. Fred> -- > 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Frederick Cheung wrote:> On Oct 28, 9:22�pm, Carlos Garcia <rails-mailing-l...@andreas-s.net> > wrote: >> >>> Fred >> >> >> We deploy to virtual hosts using apache on ubuntu. >> >> > But what sits behind that? Mod_rails, mongrel, fastcgi, scgi? >> >> hehe, sorry, fastcgi > > So as I was saying, I remember apache killing off fastcgi instances. I > think it logs (or can be told to log) when it does this. If you can > correlate this with when you get the errors then you''ll have found > your cause. > > FredHi,, I have the same problem.... I am planning to speed up the query. Will it help?? Regards Selva -- 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---