I was thinking something about that. But Rails 2.2.2 changes the game a little bit and now we have connection_pool instead of just 'connection', so I am still not aware on how to correctly deal with it.
On Jan 20, 7:05 am, "Johan Sørensen" <[email protected]> wrote: > On Mon, Jan 19, 2009 at 2:00 PM, AkitaOnRails <[email protected]> wrote: > > I am getting these errors in git-daemon: > > > 2009-01-18 09:45:23 [13024] AR error: ActiveRecord::StatementInvalid > > Mysql::Error: MySQL server has gone away: SELECT * FROM `projects` > > WHERE (`projects`.`slug` = 'locautils') LIMIT 1: > > /home/httpd/apps/gitorious/vendor/rails/activerecord/lib/ > [snip] > > Seems like the long living git-daemon process loses connection with > > the database and when someone tries to git pull from it, it dumps an > > error and for some reason doesn't reconnect. It is an ActiveRecord > > thing. Anyone has any idea on what's the best thing to do in these > > cases? > > Probably because it forks, I'm guessing AR doesn't really deal with > that. The trick is probably to call establish_connection() in the fork > block. > > JS --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Gitorious" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/gitorious?hl=en -~----------~----~----~----~------~----~------~--~---
