add ActiveRecord::ConnectionAdapters::ConnectionManagement middleware for compatiable with multi-thread mode