Hi, On Mon, Jan 19, 2009 at 6:30 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/ > active_record/connection_adapters/abstract_adapter.rb:188:in `log' > /home/httpd/apps/gitorious/vendor/rails/activerecord/lib/ > active_record/connection_adapters/mysql_adapter.rb:309:in `execute' > /home/httpd/apps/gitorious/vendor/rails/activerecord/lib/ > active_record/connection_adapters/mysql_adapter.rb:563:in `select' > /home/httpd/apps/gitorious/vendor/rails/activerecord/lib/ > active_record/connection_adapters/abstract/database_statements.rb:7:in > `select_all_without_query_cache' > /home/httpd/apps/gitorious/vendor/rails/activerecord/lib/ > active_record/connection_adapters/abstract/query_cache.rb:62:in > `select_all' > /home/httpd/apps/gitorious/vendor/rails/activerecord/lib/ > active_record/base.rb:635:in `find_by_sql' > /home/httpd/apps/gitorious/vendor/rails/activerecord/lib/ > active_record/base.rb:1490:in `find_every' > /home/httpd/apps/gitorious/vendor/rails/activerecord/lib/ > active_record/base.rb:1452:in `find_initial' > /home/httpd/apps/gitorious/vendor/rails/activerecord/lib/ > active_record/base.rb:587:in `find' > /home/httpd/apps/gitorious/vendor/rails/activerecord/lib/ > active_record/base.rb:1812:in `find_by_slug' > /home/httpd/apps/gitorious/vendor/rails/activerecord/lib/ > active_record/base.rb:1800:in `send' > /home/httpd/apps/gitorious/vendor/rails/activerecord/lib/ > active_record/base.rb:1800:in `method_missing_without_paginate' > /home/httpd/apps/gitorious/vendor/plugins/will_paginate/lib/ > will_paginate/finder.rb:164:in `method_missing' > /home/httpd/apps/gitorious/app/models/project.rb:95:in > `find_by_slug!' > /home/httpd/apps/gitorious/app/models/repository.rb:58:in > `find_by_path' > /home/httpd/apps/gitorious/script/git-daemon:95:in `run_service' > /home/httpd/apps/gitorious/script/git-daemon:91:in `fork' > /home/httpd/apps/gitorious/script/git-daemon:91:in `run_service' > /home/httpd/apps/gitorious/script/git-daemon:88:in `chdir' > /home/httpd/apps/gitorious/script/git-daemon:88:in `run_service' > /home/httpd/apps/gitorious/script/git-daemon:57:in `run' > /home/httpd/apps/gitorious/script/git-daemon:45:in `start' > /home/httpd/apps/gitorious/script/git-daemon:220 > > > 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?
I suppose you would be already using C Mysql gem which makes these issues go away, but in some cases if database queries are coming after real long time mysql server may drop the connection and hence the error. In second case, using verify_active_connections! can solve the problem. I haven't looked into source code of Git Daemon and hence i can be wrong. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
