Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Requests can only be made in the LoggedIn state, not the Final state #62

Open
BertelBB opened this issue Aug 15, 2023 · 0 comments
Open

Comments

@BertelBB
Copy link

The exporter seems to lose connection periodically with Azure SQL Managed Instance (happens daily, usually around same time) and the only thing I've seen that gives some indication as to why are errors messages coming from the exporter that are like this one:

Error executing metric mssql_batch_requests SQL query SELECT TOP 1 cntr_value
FROM sys.dm_os_performance_counters 
WHERE counter_name = 'Batch Requests/sec' RequestError: Requests can only be made in the LoggedIn state, not the Final state
    at Connection.makeRequest (/usr/src/app/node_modules/tedious/lib/connection.js:2238:24)
    at Connection.execSql (/usr/src/app/node_modules/tedious/lib/connection.js:1768:10)
    at /usr/src/app/index.js:110:16
    at new Promise (<anonymous>)
    at measure (/usr/src/app/index.js:89:10)
    at collect (/usr/src/app/index.js:123:11)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async /usr/src/app/index.js:137:5 {
  code: 'EINVALIDSTATE',
  number: undefined,
  state: undefined,
  class: undefined,
  serverName: undefined,
  procName: undefined,
  lineNumber: undefined
}

Here's a Grafana panel that shows the metrics mssql_connections and demonstrates how the scraper periodically fails to retrieve data from SQL MI.

image

  • Anyone else experienced something similar or know what could be causing this?
  • Is it possible that Azure SQL MI is doing some routine maintenance or something?
    • This seems unlikely because I am only seeing this from the scraper pod and other applications are querying SQL MI without issues during those periods.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant