Which environment? Linux? Windows? Docker?
We are running Windows Docker.
I can try this as well. It is a difference. WSL2 or Hyper-V or windows container?
we have hosted in a windows container.
Can you give me the exact image name?
Are you asking image name of MongoDB or Squidex?
The MongoDB image name. I would like to have an environment that is similar to yours.
mongo:4.2 , The underlying image id being 0df68ce04956
I can now reproduce in just single run each time.
I am testing it with mongodb on windows container now. No luck so far.
I am also asking one more developer in my team to run the program so its NOT only in my machine.
If you can, also use another mongo instance please. E.g. free atlas version.
ok, I will try to get free atlas version and try to replicate it there.
I was not able to connect to atlas version due to internal n/w blocking the outside connection. I think, we can show you issue from our machine and also provide the app back-up.
@Sebastian I have sent you back-up and updated code to reproduce the error. Please let me know how it goes.
I have create a small sample to demonstrate typical errors with concurrent updates: https://gist.github.com/SebastianStehle/2daa9bfa8b0d4770797709308bb0590b
The output
List_Add: Failed with exception: System.AggregateException: One or more errors occurred. (Collection was modified; enumeration operation may not execute.)
---> System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at Program.<>c__DisplayClass1_0.<<TestList>b__0>d.MoveNext() in D:\test\ConsoleApp1\Program.cs:line 33
--- End of inner exception stack trace ---
List_Replace: Failed with exception: System.AggregateException: One or more errors occurred. (Collection was modified; enumeration operation may not execute.)
---> System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at Program.<>c__DisplayClass1_0.<<TestList>b__0>d.MoveNext() in D:\test\ConsoleApp1\Program.cs:line 33
--- End of inner exception stack trace ---
List_Remove: Failed with exception: System.AggregateException: One or more errors occurred. (Collection was modified; enumeration operation may not execute.)
---> System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at Program.<>c__DisplayClass1_0.<<TestList>b__0>d.MoveNext() in D:\test\ConsoleApp1\Program.cs:line 33
--- End of inner exception stack trace ---
Dictionary_Add: Failed with exception: System.AggregateException: One or more errors occurred. (Collection was modified; enumeration operation may not execute.)
---> System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.Collections.Generic.Dictionary`2.Enumerator.MoveNext()
at Program.<>c__DisplayClass2_0.<<TestDictionary>b__0>d.MoveNext() in D:\test\ConsoleApp1\Program.cs:line 97
--- End of inner exception stack trace ---
Dictionary_Remove: Completed
Dictionary_Replace: Completed
I am testing different operations here: Json-arrays are basically lists and Json-objects are dictionary. Not all operations cause issues as you can see in the output, but it is confusing why we never have seen this exception.
I have an example from @RobDearlingâ
"PredictionProbability": 0.9197f6ceee565a4"}],"PassageType"
A valid JSON snippet would be the following:
It looks like the marked part has been removed and I have no idea how. I would have a look to your network. It must be somewhere there. Perhaps a package lost or something like this.
Or the disk is broken. I would bet 500⏠that it is a hardware issue.
Hi Sebastian,
We had issue happen again. I am sending JSON of the events which got corrupted. I have emailed you those files.
I tried to only delete those events but still was not able to get the Record it was still giving 500 error. Then I had to delete all events and record itself to full recover. Is there a way we can get things working by just deleting corrupted events?
Regards
Pankaj Verma