0

ive a peculiar consistent problem in production. im running rails3 + nginx with latest datamapper and ruby-enterprise

Everytime a deploy a new version (touch restart.txt) i get a bunch of errors (happen during different requests) just after the deploy has happened. The errors are not always the same:

  • DataObjects::SQLError: Lost connection to MySQL server during query

  • ArgumentError: Field-count mismatch. Expected 1 fields, but the query yielded 10

  • ArgumentError: Field-count mismatch. Expected 10 fields, but the query yielded 1

  • DataObjects::SQLError: Lost connection to MySQL server during query

im running an other rails app (2.3+apache+ruby-ent) with active record and i NEVER EVER had any problem during restarts

Does anyone have some advise on why this happens and how to get rid of it?

thanks Anders

Anders
  • 1
  • Do the messages disappear after some time or is the app broken thereafter? Also, do you have a backtrace? – Matt Jul 26 '11 at 08:49

1 Answers1

0

Do you get the same errors when you do a sudo kill -HUP nginx_pid? (do a sudo ps aux|grep nginx to get the pid).

It is indeed a very strange set of errors you're getting. Perchance you still have a session open to your db while you're restarting, causing problems with your db pool? Rails db access is usually intermittent, but I can imagine issues happening if you have a long running db query going and you attempt to restart Rails.

The fact that the errors keep changing would lead me to believe that the errors are related to resource access, rather than problems with your config.