Daily rails application error

hi, all…

each day, as far as i can tell, i run into this problem the first thing
in the morning…

when i got to my site, i get a rails application error…

i check my logs, and i get this:

Errno::ENOENT (No such file or directory - /var/lib/mysql/mysql.sock):
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/vendor/mysql.rb:104:in
`initialize’

the weird thing is… the act of checking my logs makes my site suddenly
working…

my database.yml looks like this…

production:
adapter: mysql
database: xxx
username: xxx
password: xxx
host: localhost
socket: /var/lib/mysql/mysql.sock

anyone have any ideas?

thanks!

If you check the mongrel mailing lists then you should see some posts
similar to this. Basically if the MySQL connection timeout value is
smaller than the “check timeout” value in rails then the DB server
closes the connection and ActiveREcord doesn’t check before using the
stale connection.

Setting the timeout to be smaller in rails than the DB should fix it.
(How you do that I can’t remember).

RJ

RJ wrote:

If you check the mongrel mailing lists then you should see some posts
similar to this. Basically if the MySQL connection timeout value is

got it… i will go over there and check it out…

thanks!