Is there an ideal EF database command timeout? Is it fine to set it to infinite? The default is 30 seconds, but in case of retrieving and filtering hundred thousands of data(with multiple joins but assuming with optimized queries), it is still possible for a timeout execution.
-
Connection timeout is not the same thing as the command timeout. Connection timeout (like the name suggests) is the timeout that occurs if a connection cannot be made to the server in that amount of time.Igor– Igor2018-09-05 10:32:13 +00:00Commented Sep 5, 2018 at 10:32
-
@Igor that added another question in my mind which I think should be in another thread, I think I need to correct my question, thanksxird– xird2018-09-05 10:38:18 +00:00Commented Sep 5, 2018 at 10:38
-
1There is no ideal timeout, it just depends on what the command is doing. If you have a offloaded reporting query that you expect will take an extended amount of time to complete you would use a different timeout than you would for normal transactions that should be responsive.Igor– Igor2018-09-05 10:41:16 +00:00Commented Sep 5, 2018 at 10:41
-
ah there's the explanation I`m looking forxird– xird2018-09-05 10:42:36 +00:00Commented Sep 5, 2018 at 10:42
-
1I wouldn't. If you have a deadlock at the database level your application will hang indefinitely.Igor– Igor2018-09-05 10:51:36 +00:00Commented Sep 5, 2018 at 10:51
|
Show 2 more comments