title: Dashing: connections not closing
body: <p><strong>Background:</strong>
  I am new to ruby on rails and I have created an app that reads data from mysql database and displays patient information using dashing.</p>
  
  <p><strong>Problem:</strong>
   Whenever I refresh dashboard page more than 4 times I get an ActiveRecord::ConnectionTimeoutError. I strongly believe that connections are not getting closed, as read <a href="https://stackoverflow.com/questions/18970458/redis-actioncontrollerlive-threads-not-dying/" title="here">here</a>. I tried to implement solutions given with little success. </p>
  
  <p><strong>Question/Request:</strong>  Could you explain to me what has to be done in order to remove this bug ?</p>
  
  <p><strong>Thank you for help</strong></p>
  
  <p><strong>EDIT</strong></p>
  
  <p><a href="https://i.stack.imgur.com/2n8Z2.jpg" rel="nofollow noreferrer">Redis-cli monitor output after two refreshes</a></p>
  
  <p><strong>EDIT2</strong></p>
  
  <p>Gem list:</p>
  
  <ul>
  <li>gem 'devise'</li>
  <li>gem 'rails', '4.2.5'</li>
  <li>gem 'mysql2', '>= 0.3.13', '&lt; 0.5'</li>
  <li>gem 'sass-rails', '~> 5.0'</li>
  <li>gem 'uglifier', '>= 1.3.0'</li>
  <li>gem 'coffee-rails', '~> 4.1.0'</li>
  <li>gem 'coffee-script-source', '1.8.0'</li>
  <li>gem 'jquery-rails'</li>
  <li>gem 'turbolinks'</li>
  <li>gem 'jbuilder', '~> 2.0'</li>
  <li>gem 'sdoc', '~> 0.4.0', group: :doc</li>
  <li>gem 'dashing-rails'</li>
  <li>gem 'puma'</li>
  <li>gem 'nokogiri'</li>
  <li>gem 'htmlentities'</li>
  <li>gem 'pickadate-rails'</li>
  <li>gem 'json'</li>
  </ul>
  
  <p><a href="https://i.stack.imgur.com/xbTxN.jpg" rel="nofollow noreferrer">Full error</a></p>