MikaelEliasson / EntityFramework.Utilities

Provides extensions for EntityFramework that doesn't exist out of the box like delete and update by query and bulk inserts
443 stars 175 forks source link

big data save fail #125

Closed Jasonzhangjs closed 5 years ago

Jasonzhangjs commented 5 years ago

When I batch insert 10,000 pieces of data, Object has 40 fields. I got an error : {"Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding."}
image

RudeySH commented 5 years ago

InsertAll allows you to specify batchSize, you could try making it smaller to see if it prevents hitting the timeout.

If you'd rather specify a larger timeout, I am maintaining a fork of EFUtilities that adds a configurable timeout to InsertAll:

https://github.com/RudeySH/EntityFramework.Utilities

NuGet package available over here: https://www.nuget.org/packages/RudeySH.EFUtilities/