Elasitcsearch-ruby raises "Cannot get new connection from pool" error

Still an issue over Amazon Elasticsearch Service. The only workaround that i found is restart the service everyday or every hour through crontab

crontab -e

and then write down something like

0 4 * * * service td-agent restart +5

In order to restart the service all night at 04:05. This is just a 'move on' solution...a hack.