1

I'm programming in PHP using Laravel and SQL Server. My boss is using a really, really long stored procedure in the system. So when we start uploading the file, it takes a long time, again, for the stored procedure, but after 4 and a half minutes, it returns us this error:

SQLSTATE[HY000]: General error: 20018 Cannot continue the execution because the session is in the kill state.

I googled it and i found one question on Stack Overflow, but not really sure where the problem is, because if our boss runs it directly, it's running. Any idea if it is on PHP side or the SQL Server side?

  • http://stackoverflow.com/questions/34518205/c-sharp-cmd-executescalar-cannot-continue-the-execution-because-the-session It sounds like its on your SQL side of things not so much laravel. – GabrielVa Mar 14 '16 at 19:44
  • Yeah, it sounds like a sql thing for me as well. We're gonna try another way and probably came back if i found a solution. – Hector Mendoza Mar 14 '16 at 19:54

1 Answers1

1

I would suggest diving into the SQL Stored Procedure, sounds like to me that its timing out when you try to process it. One way to help speed things up is to breakup the SP into other smaller Stored Procedures and then in the code just call them up. Can you share the SP code here to see what is going on?

GabrielVa
  • 2,353
  • 9
  • 37
  • 59
  • I would like to share it, but it's my bosse's code, so i cannot put it in here. I just know it is very VERY time consuming, we try to run it with different configuration and it took 10 minutes already. Not sure if we missconfigured something or the sp is taking that long. – Hector Mendoza Mar 14 '16 at 20:42
  • Hey dude, sorry for taking this long, but yeah! You where right. We ran it directly and it wasnt running. We Already fixed it. Thanks! – Hector Mendoza Mar 15 '16 at 07:20