Getting a Disk I/O error on Update 'delayed_jobs' SET locked_by ....

360 views
Skip to first unread message

Frank

unread,
Jul 15, 2010, 6:46:49 PM7/15/10
to delayed_job
Hi Guys,

I just updated to Delayed Job 2.0.3 from ruby gems using Rails 2.3.5.
I'm getting a funny error that I'm not sure how to deal with.

If I try to start delayed jobs with :

RAILS_ENV=cucumber script/delayed_job start

I get the following error in cucumber.log

SQL (0.4ms) SELECT name
FROM sqlite_master
WHERE type = 'table' AND NOT name = 'sqlite_sequence'

Delayed::Backend::ActiveRecord::Job Update (0.0ms)
SQLite3::IOException: disk I/O error: UPDATE "delayed_jobs" SET
locked_by = null, locked_at = null WHERE (locked_by = 'delayed_job
host:jetsauce.local pid:987')
SQLite3::IOException: disk I/O error: UPDATE "delayed_jobs" SET
locked_by = null, locked_at = null WHERE (locked_by = 'delayed_job
host:jetsauce.local pid:987')


If I use the command

RAILS_ENV=cucumber script/delayed_job start

Then I get a success message however when I check for the process
using 'ps -ef' the process does not exist. I don't see any messages in
log/production.log

Staring delayed job with just 'script/delayed_job start' and stopping
it with 'scrip/delayed_job stop' seem to work just fine.

Would anyone have an idea of what would cause this?


== Gems

actionmailer (2.3.5)
actionpack (2.3.5)
activerecord (2.3.5)
activeresource (2.3.5)
activesupport (2.3.5)
acts-as-taggable-on (2.0.6)
authlogic (2.1.5)
builder (2.1.2)
bundler (0.9.26)
capybara (0.3.9)
columnize (0.3.1)
cucumber (0.6.2)
cucumber-rails (0.2.4)
culerity (0.2.10)
daemons (1.1.0)
database_cleaner (0.5.2)
delayed_job (2.0.3)
diff-lcs (1.1.2)
easy_roles (1.0.0)
factory_girl (1.3.1)
ffi (0.6.3)
hoe (2.6.1)
json_pure (1.4.3)
linecache (0.43)
mime-types (1.16)
nifty-generators (0.4.0)
nokogiri (1.4.2)
paperclip (2.3.3)
polyglot (0.3.1)
rack (1.0.1)
rack-test (0.5.4)
rails (2.3.5)
rake (0.8.7)
rdoc (2.5.9)
rspec (1.3.0)
rspec-rails (1.3.2)
ruby-debug (0.10.3)
ruby-debug-base (0.10.3)
rubyforge (2.0.4)
selenium-client (1.2.18)
selenium-webdriver (0.0.24)
sqlite3-ruby (1.3.1)
term-ansicolor (1.0.5)
test-unit (1.2.3)
treetop (1.4.8)
ZenTest (4.3.3)

Brandon Keepers

unread,
Jul 16, 2010, 9:19:17 AM7/16/10
to delay...@googlegroups.com

On Jul 15, 2010, at 6:46 PM, Frank wrote:

> SQLite3::IOException: disk I/O error


That's not good. Corrupt sqlite database or something? Can you insert anything else into the database?

=b

David Genord II

unread,
Jul 16, 2010, 10:56:58 AM7/16/10
to delay...@googlegroups.com
Is your hard drive full?
David Genord II

Frank

unread,
Jul 16, 2010, 1:20:41 PM7/16/10
to delayed_job
That was the first thing I checked but I've got hundreds of giga bytes
left on my hard drive.

The funny thing is that it only seems to happen if I set the RAILS_ENV
environment or if I call

`script/delayed_job start` #Ruby code back ticks.

From one the my cucumber Before() scenario hooks.

I've also checked to write permission and changed them to 666 just to
be sure. But still no difference.

On Jul 16, 8:56 am, David Genord II <albus...@gmail.com> wrote:
> Is your hard drive full?
> David Genord II
>

Frank

unread,
Jul 16, 2010, 1:21:35 PM7/16/10
to delayed_job

Yeah, I thought it could be a currupt database but I dropped all the
dbs
with

rake db:drop:all
rake db:test:purge #Sanity
rake db:migrate
rake db:test:prepare

and tried it again. I still get the same error.

Frank

unread,
Jul 16, 2010, 1:28:40 PM7/16/10
to delayed_job
I dropped down to delayed_job 1.8.5 as an experiment but it seems to
make no difference. I get the exact same error.

running

script/delayed_job start

works just fine. But running

RAILS_ENV=[cucumber|production] script/delayed_job start

Causes an SQLite3 I/O error.

Terry Shuttleworth

unread,
Jul 16, 2010, 1:45:36 PM7/16/10
to delay...@googlegroups.com
If you're on a Linux box, check your /tmp space.

I had weird MySQL errors of a similar nature and an empty main
filesystem. Although the main filesystem had bags of space. /tmp
needed cleaning out

T

---

Frank

unread,
Jul 16, 2010, 2:34:33 PM7/16/10
to delayed_job
Hey Terry,

Thanks for the advice. I'm on OS X Leopard. I checked the /tmp
directory and ran a quick 'du -h'. My tmp dir is only taking up about
44KB. S

o I don't think it is that. Butt thanks for the tip! I'll keep it in
mind.

On Jul 16, 11:45 am, Terry Shuttleworth <itste...@gmail.com> wrote:
> If you're on a Linux box, check your /tmp space.
>
> I had weird MySQL errors of a similar nature and an empty main
> filesystem. Although the main filesystem had bags of space. /tmp
> needed cleaning out
>
> T
>
> ---
>

Frank

unread,
Jul 17, 2010, 5:10:25 PM7/17/10
to delayed_job
So I started a new project and slowly imported all my app files one by
one to try and find out why I'm getting the IOException and I've
discovered new odd behavior.

If I include the functions 'acts_as_tagable' from the gem 'acts-as-
tagable-on' or 'acts-as-authentic' from the gem 'authlogic'into any
object and I run the command 'RAILS_ENV=cucumber scrip/delayed_job
start' I get the IOException.

However If I comment out the functions listed above then delayed_job
starts up just fine with no IOException.

Am I going crazy? Or is my Dev environment just screwed?
Reply all
Reply to author
Forward
0 new messages