0

I've suddenly started getting a lot of SignalException:SIGTERM exceptions in an application, apparently coming from mysql. Stacktraces like

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'

or

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'

I'm a bit stumped. Any ideas where to start digging?

jemminger
  • 5,133
  • 4
  • 26
  • 47

1 Answers1

2

What platform are you running on and what version of MySql are you running? It sounds like the mysql client libraries or the mysql server might be broke. Also, is this a fresh app or one that's been running problem free for a while?

Reinstalling MySql is probably your best chance, but before you do that try using the alternative mysql adaptors: mysql2 and ruby-mysql. You might have a bit of luck there that would save a lot of time and hassle.

Dave A-R
  • 1,159
  • 1
  • 11
  • 22
  • Centos 5.4, Mysql 5.0.77, REE, Rails 2.3.5. The app has been pretty trouble-free for a long while. Thanks for the suggestions, I might try the mysql2 gem. I'll likely also investigate upgrading Mysql to v5.5 – jemminger Jul 05 '11 at 16:04
  • @jemminger how did you end up fixing your issue? – Cjoerg Jul 23 '14 at 14:28
  • @ChristofferJoergensen Oh boy, this was a long time ago...not sure really. It might have been some OOM issue. That app's been upgraded to mysql2 gem, rails 3+, mysql 5.5 for years now, and haven't seen the error since. – jemminger Jul 23 '14 at 18:05