ActiveRecord connection pooling

added connection pool for thread method