Random MySQL exceptions in a Rails application

I am having problems with my MySQL server for my Rails application.

Basically, every time I deploy, I start getting weird exceptions like

ActiveRecord::StatementInvalid: Mysql2::Error: 
NoMethodError: undefined method `fields' for nil:NilClass
ActiveModel::MissingAttributeError: missing attribute: created_at
ActiveRecord::StatementInvalid: Mysql2::Error: Lost connection to MySQL server during query
ActiveRecord::UnknownPrimaryKey: Unknown primary key for table users in model User.
RuntimeError: Session collision on '"017fab6b21d2ef20d30e6119f7bf...."'

I'm not sure if this is due to a sudden load, which my MySQL instance cannot accept, but it happens 99% when I restart the application after deployment.

What could be the reason for this? I have Rails 3.2.6, Ubuntu 12.04, MySQL 5.1.63

+5
source share
2 answers

, , . ( Debian + unicorn + MySQL), 4 2 ( config/database.yml). , , , , . , , MySQL .

. , .

+1

, , "". db "created_at"? / .

0

All Articles