title: node.js mssql UPDATE Statements take > 1 minute to execute
body: <p>At the moment I am deploying a node.js application with IIS reverse proxy at a test server. I am working with mssql package to connect to the SQL Server 2014. For testing on my local machine everything worked fine (SQL Server 2019), but now on the test server I mentioned a really strange behaviour of <code>UPDATE</code> and <code>INSERT</code> statements on the server.</p>
  <p>Example statement:</p>
  <pre><code>UPDATE name 
  FROM renters 
  WHERE id = 1
  </code></pre>
  <p>Very trivial statements like this, in rather small tables (&lt; 400 rows, &lt; 200 columns) sometimes take 1-2 minutes to execute, while <code>SELECT</code> statements execute immediately without delay.</p>
  <p>Up to now I could not identify a reasonable problem that causes this behaviour. I was thinking about maybe it is about the SQL Server version or about some restrictions only on <code>UPDATE</code> and <code>INSERT</code> statements by the Database manager, but in my eyes that's also not really realistic, or maybe due to a strange behaviour of the pooling connections? Am I missing something?</p>
  <p>BTW I am using the basic connnector, proposed by mssql with pool connections like this:</p>
  <pre><code>const sql = require('mssql')
  const sqlConfig = {
    user: process.env.DB_USER,
    password: process.env.DB_PWD,
    database: process.env.DB_NAME,
    server: 'localhost',
    pool: {
      max: 10,
      min: 0,
      idleTimeoutMillis: 30000
    },
    options: {
      encrypt: true, // for azure
      trustServerCertificate: false // change to true for local dev / self-signed certs
    }
  }
  
  async () =&gt; {
   try {
    // make sure that any items are correctly URL encoded in the connection string
    await sql.connect(sqlConfig)
    const result = await sql.query`select * from mytable where id = ${value}`
    console.dir(result)
   } catch (err) {
    // ... error checks
   }
  }
  </code></pre>