[Backgroundrb-devel] Yet Another Problem with BackgroundRB

Mike Aizatsky mike.aizatsky at gmail.com
Mon Jan 22 11:00:18 EST 2007


Mason,

The stacktrace is at the end of the message.

> If you run the same worker over and over, can you recreate the problem?
> Or does this happen after no worker is run for some extended period of time?
> (I'm guessing
> here that the db connection might be timing out)

I'm running my worker every 10 minutes. According to log files
sometimes it takes just 3-4 executions to break. But I've also
experienced a longer periods of successfull runs (3-4 hours).

>
> Do you know if the problem is triggered by a certain number of innvocations,
> or is it a lack of activity, or neither?

Nope, I don't. However it does look like something is wrong with connection.

---------
20070122-15:21:00 (22914) Mysql::Error: Unknown column
'drill_notification' in 'where clause': SELECT * FROM users WHERE
(drill_notification = 1 AND drill_notification_last_send < '20070122'
AND drill_notification_time < 44460 )  -
(ActiveRecord::StatementInvalid)rs/abstract_adapter.rb:128:in
`log'0070122-15:21:00 (22914)
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.1/lib/active_record/connection_adapters/mysql_adapter.rb:243:in
`execute'070122-15:21:00 (22914)
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.1/lib/active_record/connection_adapters/mysql_adapter.rb:395:in
`select'0070122-15:21:00 (22914)
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.1/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in
`select_all'(22914)
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.1/lib/active_record/base.rb:424:in
`find_by_sql'
20070122-15:21:00 (22914)
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.1/lib/active_record/base.rb:994:in
`find_every'
20070122-15:21:00 (22914)
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.1/lib/active_record/base.rb:415:in
`find'
20070122-15:21:00 (22914)
/u/apps/learnbyrote/releases/20070121210300/config/../app/models/user.rb:74:in
`find_all_to_send_drill_reminder'
20070122-15:21:00 (22914)
/u/apps/learnbyrote/releases/20070121210300/lib/workers/drill_reminder_worker.rb:10:in
`do_work'
20070122-15:21:00 (22914)
/u/apps/learnbyrote/releases/20070121210300/vendor/plugins/backgroundrb/server/lib/backgroundrb/worker.rb:55:in
`send'
20070122-15:21:00 (22914)
/u/apps/learnbyrote/releases/20070121210300/vendor/plugins/backgroundrb/server/lib/backgroundrb/worker.rb:55:in
`work_thread'070122-15:21:00 (22914)
/u/apps/learnbyrote/releases/20070121210300/vendor/plugins/backgroundrb/server/lib/backgroundrb/worker.rb:69:in
`call'
20070122-15:21:00 (22914)
/u/apps/learnbyrote/releases/20070121210300/vendor/plugins/backgroundrb/server/lib/backgroundrb/worker.rb:69:in
`work_thread'070122-15:21:00 (22914)
/u/apps/learnbyrote/releases/20070121210300/vendor/plugins/backgroundrb/server/lib/backgroundrb/worker.rb:67:in
`initialize'0070122-15:21:00 (22914)
/u/apps/learnbyrote/releases/20070121210300/vendor/plugins/backgroundrb/server/lib/backgroundrb/worker.rb:67:in
`new'
20070122-15:21:00 (22914)
/u/apps/learnbyrote/releases/20070121210300/vendor/plugins/backgroundrb/server/lib/backgroundrb/worker.rb:67:in
`work_thread'070122-15:21:00 (22914)
/opt/local/lib/ruby/1.8/drb/drb.rb:1555:in `__send__'
20070122-15:21:00 (22914) /opt/local/lib/ruby/1.8/drb/drb.rb:1555:in
`perform_without_block'
20070122-15:21:00 (22914) /opt/local/lib/ruby/1.8/drb/drb.rb:1515:in `perform'
20070122-15:21:00 (22914) /opt/local/lib/ruby/1.8/drb/drb.rb:1589:in `main_loop'
20070122-15:21:00 (22914) /opt/local/lib/ruby/1.8/drb/drb.rb:1585:in `loop'
20070122-15:21:00 (22914) /opt/local/lib/ruby/1.8/drb/drb.rb:1585:in `main_loop'
20070122-15:21:00 (22914) /opt/local/lib/ruby/1.8/drb/drb.rb:1581:in `start'
20070122-15:21:00 (22914) /opt/local/lib/ruby/1.8/drb/drb.rb:1581:in `main_loop'
20070122-15:21:00 (22914) /opt/local/lib/ruby/1.8/drb/drb.rb:1430:in `run'
20070122-15:21:00 (22914) /opt/local/lib/ruby/1.8/drb/drb.rb:1427:in `start'
20070122-15:21:00 (22914) /opt/local/lib/ruby/1.8/drb/drb.rb:1427:in `run'
20070122-15:21:00 (22914) /opt/local/lib/ruby/1.8/drb/drb.rb:1347:in
`initialize'
20070122-15:21:00 (22914) /opt/local/lib/ruby/1.8/drb/drb.rb:1627:in `new'
20070122-15:21:00 (22914) /opt/local/lib/ruby/1.8/drb/drb.rb:1627:in
`start_service'
20070122-15:21:00 (22914)
/opt/local/lib/ruby/gems/1.8/gems/slave-1.2.0/lib/slave.rb:396:in
`initialize'
20070122-15:21:00 (22914)
/opt/local/lib/ruby/gems/1.8/gems/slave-1.2.0/lib/slave.rb:391:in
`times'
20070122-15:21:00 (22914)
/opt/local/lib/ruby/gems/1.8/gems/slave-1.2.0/lib/slave.rb:391:in
`initialize'


On 1/22/07, Mason Hale <masonhale at gmail.com> wrote:
> Hi Mike --
>
> Can you please provide a stack trace or error message?
>
> If you run the same worker over and over, can you recreate the problem?
> Or does this happen after no worker is run for some extended period of time?
> (I'm guessing
> here that the db connection might be timing out)
>
> Do you know if the problem is triggered by a certain number of innvocations,
> or is it a lack of activity, or neither?
>
> Mason
>
>
>  On 1/22/07, Mike Aizatsky <mike.aizatsky at gmail.com> wrote:
> >
> > Hi!
> >
> > My cron-based worker is being indeed invoked by backgroundRB at
> > correct times. But... After several runs it can no longer find DB
> > columns! The same query, which was running OK an hour ago starts to
> > throw MySQL error about unkown column in where clause. If I restart
> > backgroundrb it works for some time but stops working after several
> > invocations.
> >
> > Has anyone epxerienced the similar beahviour? Are there any ideas of
> > what can be wrong? Any hints? Anything I can check?
> >
> > --
> > Regards,
> > Mike
> > _______________________________________________
> > Backgroundrb-devel mailing list
> > Backgroundrb-devel at rubyforge.org
> >
> http://rubyforge.org/mailman/listinfo/backgroundrb-devel
> >
>
>


-- 
Regards,
Mike


More information about the Backgroundrb-devel mailing list