I tried to understand what is the difference between connection and session upon mongoDB connection. I do understand that sessions are stored in cache on the db side, and cleaned up per 5 minutes (configurable). What the purpose of sessions? What would happen if I will use the same session for multiple queries (for different collections) I read this excellent post about sessions: https://www.percona.com/blog/2021/06/03/mongodb-message-cannot-add-session-into-the-cache-toomanylogicalsessions/
Im using mongoengine and pymongo clients.
Please help me understand it. Thanks.