-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migration fails to complete with transaction error #572
Comments
It ran successfully with transactions off. |
@worldspawn I am also getting this error; any solutions other than to run with transactions off? |
We had the same issue and it seems to be the TransactionScope default timeout of 1 minute being hit. See System.Transaction defaults from source code and TransactionManager.DefaultTimeout Property. Changing the default timeout to something higher when creating the new TransactionScope worked for us: use one of the constructors taking a timespan TransactionScope Constructors in place of the one on line 139 in GrateMigrator.cs. Could for example be GrateMigrator.cs:137-140
if (runInTransaction)
{
// with timeout of 5 minutes
scope = new TransactionScope(TransactionScopeOption.Required, new TimeSpan(0,5,0), TransactionScopeAsyncFlowOption.Enabled);
// original
scope = new TransactionScope(TransactionScopeAsyncFlowOption.Enabled);
} Note that if the argument to the constructor is greater than the DefaultMaxTimeout of 10 minutes then the DefaultMaxTimeout will be used. This can however be overwritten (without reflection hacks) since they added a setter to TransactionManager.DefaultMaxTimeout (and DefaultTimeout) in 71703. Perhaps this transaction issue in grate can be fixed by adding an additional parameter similar to the current |
We experience the same issue as @Jackietf describes. |
Thanks for sharing @Jackietf, I'm running into the same issue. |
Describe the bug
On only one environment we are unable to migrate our latest script. The script itself appears to run but then it chokes in "InsertScriptRun"
To Reproduce
Unsure of the cause. Same migration worked on all our other environments. We can also run the script itself against the target env (with a rollback) with no issues. The script contains no BEGIN TRAN/ROLLBACK or anything transaction related.
Expected behavior
My database is grated
Screenshots
Desktop (please complete the following information):
Additional context
command run:
Verbose log output:
The text was updated successfully, but these errors were encountered: