```ruby
module Protobuf
  module ActiveRecord
    module ServiceFilters
      extend ::ActiveSupport::Concern

      included do
        around_filter :_protobuf_active_record_with_connection
      end

      def _protobuf_active_record_with_connection
        ::ActiveRecord::Base.connection_pool.with_connection do
          yield
        end
      end
    end
  end
end
```

Use clear_active_connections! instead of with_connection
user
```ruby
module Protobuf
  module ActiveRecord
    module ServiceFilters
      extend ::ActiveSupport::Concern

      included do
        after_filter :_protobuf_active_record_clear_active_connections
      end

      def _protobuf_active_record_clear_active_connections
        ::ActiveRecord::Base.clear_active_connections!
      end
    end
  end
end
```
assistant