You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched existing issues to ensure the bug has not already been reported
Mongoose version
8.7.0
Node.js version
20.11.1
MongoDB server version
8.0.0
Typescript version (if applicable)
5.5.3
Description
When using the withTransaction API with Mongoose to handle transactions, I’m encountering significant delays that ultimately result in 502 errors. However, when I handle transactions manually (starting, committing, and aborting), the same operations complete successfully and within expected timeframes. This suggests an inefficiency or potential bug within withTransaction.
Steps to Reproduce
Start a transaction using session.withTransaction.
Perform multiple database operations within the transaction, including create, update, and delete across various collections.
Observe that the transaction takes considerably longer than expected, sometimes leading to a 502 error in the backend.
Expected Behavior
The withTransaction API should handle transactions efficiently, ensuring all operations are either committed or rolled back in a timely manner without introducing unexpected delays.
Observed Behavior
Prolonged transaction times, resulting in 502 errors.
The issue does not occur with manual transaction handling (startTransaction, commitTransaction, and abortTransaction).
Delays are more noticeable under higher loads or with concurrent transactions.
The text was updated successfully, but these errors were encountered:
Prerequisites
Mongoose version
8.7.0
Node.js version
20.11.1
MongoDB server version
8.0.0
Typescript version (if applicable)
5.5.3
Description
When using the withTransaction API with Mongoose to handle transactions, I’m encountering significant delays that ultimately result in 502 errors. However, when I handle transactions manually (starting, committing, and aborting), the same operations complete successfully and within expected timeframes. This suggests an inefficiency or potential bug within withTransaction.
Steps to Reproduce
Expected Behavior
The withTransaction API should handle transactions efficiently, ensuring all operations are either committed or rolled back in a timely manner without introducing unexpected delays.
Observed Behavior
Prolonged transaction times, resulting in 502 errors.
The issue does not occur with manual transaction handling (startTransaction, commitTransaction, and abortTransaction).
Delays are more noticeable under higher loads or with concurrent transactions.
The text was updated successfully, but these errors were encountered: