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.
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.
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…