2011-07-05 29 views
0

我突然開始在應用程序中出現很多SignalException:SIGTERM異常,顯然來自mysql。像SIGTERM + Rails + mysql?

vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:217 
vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:217:in `log' 
vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:323:in `execute' 
vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:608:in `select' 
vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in `select_all_without_query_cache' 

vendor/rails/activesupport/lib/active_support/buffered_logger.rb:63 
vendor/rails/activesupport/lib/active_support/buffered_logger.rb:63:in `add' 
vendor/rails/activesupport/lib/active_support/buffered_logger.rb:71:in `debug' 
vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:196:in `log_info' 
vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:218:in `log' 
vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:323:in `execute' 
vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:608:in `select' 
vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in `select_all_without_query_cache' 

蹤跡我有點難倒。任何想法從哪裏開始挖掘?

回答

2

你在運行什麼平臺以及你運行的是哪個版本的MySql?這聽起來像是MySQL客戶端庫或MySQL服務器可能會破產。此外,這是一個新的應用程序或一直在運行問題一段時間?

重新安裝MySql可能是您最好的機會,但在嘗試使用替代mysql適配器之前,請嘗試:mysql2和ruby-mysql。你可能會有一點運氣,這將節省很多時間和麻煩。

+0

Centos 5.4,Mysql 5.0.77,REE,Rails 2.3.5。很長一段時間以來,該應用程序已相當無故障。感謝您的建議,我可能會嘗試mysql2寶石。我也可能會調查將Mysql升級到v5.5 – jemminger

+0

@jemminger您是如何解決您的問題的? – ChristofferJoergensen

+0

@ChristofferJoergensen哦,男孩,這是很久以前...不確定。這可能是一些OOM問題。該應用程序已升級到mysql2 gem,rails 3+,mysql 5.5已有多年,並且從那以後就沒有看到過這個錯誤。 – jemminger