nginx restart issues
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 yie开发者_开发技巧lded 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
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.
精彩评论