0

I have a Laravel project that is wired up to a SQL Server database and uses BugSnag to capture and log bugs that arise.

We've been getting a lot of random "Adaptive Server Connection Timeout" issues from users at various points in the application.

I have never been able to programmatically recreate the issue our users encounter.

I'm wondering if there is a way to somehow simulate the connection timeout issue on demand so I can confirm that my proposed fixes resolve it.

jeffjenx
  • 17,041
  • 6
  • 57
  • 99
  • Possible duplicate of [TinyTds Error: Adaptive Server connection timed out](https://stackoverflow.com/questions/27312327/tinytds-error-adaptive-server-connection-timed-out) – bato3 Mar 06 '19 at 14:34
  • Thanks for the link @bato3. Are you thinking I tweak these settings to lower values to trigger the issue? (Sorry we just lost our database lead. I'm a frontend developer. I'm a little lost at the moment.) Note: I'm not trying to "solve" the connection timeout issue with this question. I'm trying to understand how to create it on demand. – jeffjenx Mar 06 '19 at 14:36
  • I do not know if it makes sense, because your SQL server says: *I do not have the resources to handle you*. This may be because you open too many connections to the database instead of using the previously opened one (Logical error, can't reproduce on local env). But you're rather bouncing off the SQL server limits. (client or server configuration mistakes) – bato3 Mar 06 '19 at 14:44
  • 1
    I forgot about unoptimal queries / deadlocks. When the query is executed for a long time, the web open another connection to the database until they are finally missing. Check [slow_query_log](https://serverfault.com/questions/182665/does-mssql-server-have-the-equivalent-of-mysqls-query-logs). Or log the query execution time in your app. (eg overriding the `execute()` method) – bato3 Mar 06 '19 at 14:55

0 Answers0