Background: 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.
Problem: 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 here. I tried to implement solutions given with little success.
Question/Request: Could you explain to me what has to be done in order to remove this bug ?
Thank you for help
EDIT
Redis-cli monitor output after two refreshes
EDIT2
Gem list:
- gem 'devise'
- gem 'rails', '4.2.5'
- gem 'mysql2', '>= 0.3.13', '< 0.5'
- gem 'sass-rails', '~> 5.0'
- gem 'uglifier', '>= 1.3.0'
- gem 'coffee-rails', '~> 4.1.0'
- gem 'coffee-script-source', '1.8.0'
- gem 'jquery-rails'
- gem 'turbolinks'
- gem 'jbuilder', '~> 2.0'
- gem 'sdoc', '~> 0.4.0', group: :doc
- gem 'dashing-rails'
- gem 'puma'
- gem 'nokogiri'
- gem 'htmlentities'
- gem 'pickadate-rails'
- gem 'json'