Topic: Timeout Issue Broken pipe

Hello,

I recently deployed my rails 3.0.1 app running on Thin 1.2.7 inside a  Ubuntu 10.04 server. The app runs fine, but after certain hours of inactivity, it would stop processing request, and throws the following error

Started GET "/users/new" for at Sat Oct 30 11:58:04 -0400 2010
NoMethodError (undefined method `unpack' for nil:NilClass):
Started GET "/favicon.ico" for  at Sat Oct 30 11:58:04 -0400 2010
Errno::EPIPE (Broken pipe):

If I restart my server, the app will work once again. I tried enabling 'reconnect: true' in the databases.yml to see if it helps, but I am still seeing this issue.  I was wondering if anyone has any insights or what I can do to solve this problem. Thanks.

Here's the stack

activesupport (3.0.0) lib/active_support/whiny_nil.rb:48:in `method_missing'
ruby-mysql (2.9.3) lib/mysql/protocol.rb:567:in `read'
/usr/lib/ruby/1.8/timeout.rb:53:in `timeout'
ruby-mysql (2.9.3) lib/mysql/protocol.rb:565:in `read'
ruby-mysql (2.9.3) lib/mysql/protocol.rb:641:in `simple_command'
ruby-mysql (2.9.3) lib/mysql/protocol.rb:545:in `synchronize'
ruby-mysql (2.9.3) lib/mysql/protocol.rb:638:in `simple_command'
ruby-mysql (2.9.3) lib/mysql/protocol.rb:413:in `statistics_command'
ruby-mysql (2.9.3) lib/mysql.rb:502:in `stat'
activerecord (3.0.0) lib/active_record/connection_adapters/mysql_adapter.rb:238:in `active?'
activerecord (3.0.0) lib/active_record/connection_adapters/abstract_adapter.rb:148:in `verify!'
activerecord (3.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:250:in `checkout_and_verify'
activesupport (3.0.0) lib/active_support/callbacks.rb:413:in `_run_checkout_callbacks'
activesupport (3.0.0) lib/active_support/callbacks.rb:93:in `send'
activesupport (3.0.0) lib/active_support/callbacks.rb:93:in `run_callbacks'
activerecord (3.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:249:in `checkout_and_verify'
activerecord (3.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:245:in `checkout_existing_connection'
activerecord (3.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:192:in `checkout'
activerecord (3.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:190:in `loop'
activerecord (3.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:190:in `checkout'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
activerecord (3.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:189:in `checkout'
activerecord (3.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:96:in `connection'
activerecord (3.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:318:in `retrieve_connection'
activerecord (3.0.0) lib/active_record/connection_adapters/abstract/connection_specification.rb:97:in `retrieve_connection'
activerecord (3.0.0) lib/active_record/connection_adapters/abstract/connection_specification.rb:89:in `connection'
activerecord (3.0.0) lib/active_record/query_cache.rb:12:in `cache'
activerecord (3.0.0) lib/active_record/query_cache.rb:31:in `call'
activerecord (3.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:355:in `call'
actionpack (3.0.0) lib/action_dispatch/middleware/callbacks.rb:46:in `call'
activesupport (3.0.0) lib/active_support/callbacks.rb:415:in `_run_call_callbacks'
actionpack (3.0.0) lib/action_dispatch/middleware/callbacks.rb:44:in `call'
rack (1.2.1) lib/rack/sendfile.rb:107:in `call'
actionpack (3.0.0) lib/action_dispatch/middleware/remote_ip.rb:48:in `call'
actionpack (3.0.0) lib/action_dispatch/middleware/show_exceptions.rb:46:in `call'
railties (3.0.0) lib/rails/rack/logger.rb:13:in `call'
rack (1.2.1) lib/rack/runtime.rb:17:in `call'
actionpack (3.0.0) lib/action_dispatch/middleware/static.rb:30:in `call'
railties (3.0.0) lib/rails/application.rb:168:in `call'
railties (3.0.0) lib/rails/application.rb:77:in `send'
railties (3.0.0) lib/rails/application.rb:77:in `method_missing'
thin (1.2.7) lib/thin/connection.rb:76:in `pre_process'
thin (1.2.7) lib/thin/connection.rb:74:in `catch'
thin (1.2.7) lib/thin/connection.rb:74:in `pre_process'
thin (1.2.7) lib/thin/connection.rb:57:in `process'
thin (1.2.7) lib/thin/connection.rb:42:in `receive_data'
eventmachine (0.12.10) lib/eventmachine.rb:256:in `run_machine'
eventmachine (0.12.10) lib/eventmachine.rb:256:in `run'
thin (1.2.7) lib/thin/backends/base.rb:57:in `start'
thin (1.2.7) lib/thin/server.rb:156:in `start'
thin (1.2.7) lib/thin/controllers/controller.rb:80:in `start'
thin (1.2.7) lib/thin/runner.rb:177:in `send'
thin (1.2.7) lib/thin/runner.rb:177:in `run_command'
thin (1.2.7) lib/thin/runner.rb:143:in `run!'
thin (1.2.7) bin/thin:6
/usr/bin/thin:19:in `load'
/usr/bin/thin:19

Re: Timeout Issue Broken pipe

I am having the exact same problem, i increased the timeout in the mysql config, but that wasn't the problem.

Anyone with a solution?