I'm trying to troubleshoot why my index rebuild doesn't work with WITH (SORT_IN_TEMPDB = ON, ONLINE = ON) in Microsoft SQL Server 2016 (SP1-CU3) (KB4019916) - 13.0.4435.0 (X64). I get the following error:

Cannot continue the execution because the session is in the kill state.

I ran DBCC CHECKDB which returned no errors. I have rerun with SORT_IN_TEMPDB = OFF and it seems to work but takes a very long time. I have 86GB free disk space in TEMPDB drive, so it can't be a disk space issues.

Does anyone have any ideas?

  • Please add the output of select @@version in the question – Shanky Apr 26 '18 at 9:57
  • I believe this is due to low disk space on tempdb – Shanky Apr 26 '18 at 10:01
  • @Shanky Added version. Is it possible it could be disk space even with 86GB free on TEMPDB drive? – Powellellogram Apr 26 '18 at 10:06
  • I think I once read that tempdb should be sized AT LEAST as big as your largest index (cannot find reference), for maintenance purposes. That is not to say that tempdb only needs to be as big as your largest index. Is your tempdb sized accordingly and is auto-growth enabled? – DimUser Apr 26 '18 at 10:42
  • @DImUser Looks like one of my indexes is 28GB, and I have 26GB free disk space on my prod server (Where the error initially happened). However, I replicated the error on my staging server which has 86GB of free tempdb disk space.. Odd.. – Powellellogram Apr 26 '18 at 10:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.