How to use Mongoid with Lambda Execution Context?

question

#1

Hello, I’m trying to use Mongoid with my Jets application, but I’m facing issues with the Connection Pool.

I have followed the instructions from this post:

But my connections to the database go through the roof.

So, as mentioned in the docs, here:
https://rubyonjets.com/docs/database/activerecord/

With ActiveRecord, Jets uses the Lambda Execution Context to have a centralized connection pool to the database.

How can I achieve the same using Mongoid?

Thanks!
Andres