Rails Resque jobs cannot access database, i/o error

為{幸葍}努か 提交于 2019-12-11 02:59:45

问题


I have an error I cannot find any information on. This is a Ruby on Rails stack (Ruby 1.9, Rails 3.2) and using sqlite3 database for development. Resque and Redis are used for background jobs. The rails web application starts up fine and can access and update the database. I can login with sqlite browser and see records and run queries. The issue is any Resque job cannot access database, and gets an I/O exception. I can see the jobs on the resque web browser/queue and retry them but they still fail. Any help is greatly appreciated, thank you.

ActiveRecord::StatementInvalid
Error
SQLite3::IOException: disk I/O error: SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1
/Users/Ben/.rvm/gems/ruby-1.9.3-p484/gems/sqlite3-1.3.8/lib/sqlite3/statement.rb:108:in `step'
/Users/Ben/.rvm/gems/ruby-1.9.3-p484/gems/sqlite3-1.3.8/lib/sqlite3/statement.rb:108:in `block in each'
/Users/Ben/.rvm/gems/ruby-1.9.3-p484/gems/sqlite3-1.3.8/lib/sqlite3/statement.rb:107:in `loop'
/Users/Ben/.rvm/gems/ruby-1.9.3-p484/gems/sqlite3-1.3.8/lib/sqlite3/statement.rb:107:in `each'
/Users/Ben/.rvm/gems/ruby-1.9.3-p484/gems/activerecord-3.2.17/lib/active_record/connection_adapters/sqlite_adapter.rb:263:in `to_a'
/Users/Ben/.rvm/gems/ruby-1.9.3-p484/gems/activerecord-3.2.17/lib/active_record/connection_adapters/sqlite_adapter.rb:263:in `block in exec_query'
/Users/Ben/.rvm/gems/ruby-1.9.3-p484/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `block in log'

来源:https://stackoverflow.com/questions/24129160/rails-resque-jobs-cannot-access-database-i-o-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!