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
When we bulk upsert environment variables we wrap the entire thing in a database transaction. If there are a lot of env vars (e.g. more than 100) then the transaction can timeout.
You can see in the current code that the transaction is wrapped around the for loop:
Instead we should move that transaction inside the for loop. We still need the transaction so we always create all the resources for each env var and don't leave any of them dangling.
The text was updated successfully, but these errors were encountered:
matt-aitken
changed the title
Updating lots of environment variables at once fails with a transaction timeout
[TRI-3867] Updating lots of environment variables at once fails with a transaction timeout
Oct 15, 2024
When we bulk upsert environment variables we wrap the entire thing in a database transaction. If there are a lot of env vars (e.g. more than 100) then the transaction can timeout.
You can see in the current code that the transaction is wrapped around the for loop:
trigger.dev/apps/webapp/app/v3/environmentVariables/environmentVariablesRepository.server.ts
Line 138 in feb4fcd
Instead we should move that transaction inside the for loop. We still need the transaction so we always create all the resources for each env var and don't leave any of them dangling.
TRI-3867
The text was updated successfully, but these errors were encountered: