hi, i have used backgroundrb to update the database with the files having some useful data, where i am getting files periodically uploaded. it works well, but suddenly it stops the worker and stopped the updation. when i checked the backgroundrb.log file it shows Mysql::Error: MySQL server has gone away: (Query used for updation) LIMIT 1 - (ActiveRecord::StatementInvalid) but, the query is working fine in mysql. i have created one worker to do the updation with job_key. when i checked the job_key value for the particular worker is shows nil. since the worker was stopped. what would be the problem, how can i make the updation works continuously. ur madhan -- 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 -~----------~----~----~----~------~----~------~--~---
Madhankumar Nagaraj wrote:> hi, > i have used backgroundrb to update the database with the files having > some useful data, where i am getting files periodically uploaded. > it works well, but suddenly it stops the worker and stopped the > updation. > when i checked the backgroundrb.log file > it shows > Mysql::Error: MySQL server has gone away: (Query used for updation) > LIMIT 1 - (ActiveRecord::StatementInvalid) > but, the query is working fine in mysql. > > i have created one worker to do the updation with job_key. > when i checked the job_key value for the particular worker is shows nil. > since the worker was stopped. > > what would be the problem, how can i make the updation works > continuously.Your MySQL session is timing-out after the default 8 hours. Either increase the timeout by adding the following line to the [mysqld] section of the /etc/my.cnf file: set-variable = wait_timeout=<#seconds> or you can instead insert a call to ActiveRecord::Base.verify_active_connections! ahead of any database queries. The verify_active_connections! method is called by Rails before every request, but your backgroundrb process will not be getting this constant hammering to keep its database connection alive. -- Rails Wheels - Find Plugins, List & Sell Plugins - http://railswheels.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 -~----------~----~----~----~------~----~------~--~---
> Your MySQL session is timing-out after the default 8 hours. > > Either increase the timeout by adding the following > line to the [mysqld] section of the /etc/my.cnf file: > > set-variable = wait_timeout=<#seconds> > > or you can instead insert a call to > > ActiveRecord::Base.verify_active_connections! > > ahead of any database queries. > > The verify_active_connections! method is called by > Rails before every request, but your backgroundrb > process will not be getting this constant hammering > to keep its database connection alive. >Dear Mark, first i want to thank for ur response, i am not making the mysql to wait, every 15 minutes i am getting the files uploaded. it works well for 1 week (avg) then it stops suddenly.. ur Madhan -- 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 -~----------~----~----~----~------~----~------~--~---
You might want to try the BackgrounDRb mail list also http://rubyforge.org/mailman/listinfo/backgroundrb-devel On Jan 2, 6:18 am, Madhankumar Nagaraj <rails-mailing-l...@andreas- s.net> wrote:> > Your MySQL session is timing-out after the default 8 hours. > > > Either increase the timeout by adding the following > > line to the [mysqld] section of the /etc/my.cnf file: > > > set-variable = wait_timeout=<#seconds> > > > or you can instead insert a call to > > > ActiveRecord::Base.verify_active_connections! > > > ahead of any database queries. > > > The verify_active_connections! method is called by > > Rails before every request, but your backgroundrb > > process will not be getting this constant hammering > > to keep its database connection alive. > > Dear Mark, > > first i want to thank for ur response, > > i am not making the mysql to wait, every 15 minutes i am getting the > files uploaded. it works well for 1 week (avg) then it stops suddenly.. > > ur > Madhan > -- > 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 -~----------~----~----~----~------~----~------~--~---