-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Cannot insert the value NULL error with PerformanceCounters query #7325
Comments
@danielnelson is this true only of Basic tier? Most new DB's are Vcore model, haven't ever tested with Basic given it has a 2GB limit and not sure anyone who is on it actually does detailed monitoring |
BTW just instantiated a basic tier and tested the query atleast works fine will have to pull latestest branch and test. |
I've only tested with basic tier and essentially an empty database. |
@danielnelson @denzilribeiro I am seeing this issue on a vCore GP Gen 4 SKU, this issue seems to also eat up CPU as disabling this counter seems to be the only resolution |
@andrewmitchell21 are you seeing this? If so will send you a TSQL script outside of the collector "Cannot insert the value NULL into column 'instance_name', table '@PCounters'; column does not allow nulls. INSERT fails." I don't get the eating CPU - this was more of an error. |
FYI for CPU - see this #7236 ( and associated fix) - is your DB at compat level 140 or earlier? |
@danielegozzi I might have just put the two together and made an assumption, however, I do still see the performance degradation with this counter enabled and I am using v1.41
Most of the databases are at a compatibility level of 150 or 140, I believe 150 is backwards compatible with 140 |
Can you please run the query itself and give me the output? of these 2 statements on the server hitting the error in collecting? b. Result for this query:
'SQLServer:Workload Group Stats' AS object, |
@denzilribeiro both of those queries don't return any results, however, if I change where instance_name is null to = '' I get results on the first query but on the second query nothing is returned with either query, would you like me to share these and if so how? if it helps running: SELECT COUNT(*) FROM sys.dm_os_performance_counters where instance_name = '' returns 294 records |
Empty is not the same as NULL. DECLARE @PCounters TABLE -- But this does not? |
Yep aware of them not being the same, and yeah top insert works but the bottom doesn't @denzilribeiro |
Can we sync up online ( easier to debug)- denzilr@microsoft.com will take like 5 mins if can get a repro - has to be a specific combination of things SET DEADLOCK_PRIORITY -10; INSERT INTO @PCounters |
@denzilribeiro sure, do you use ms teams? |
Yep please ping me on teams |
Talking to Andrew and getting some details, was able to repro it ONLY for Elastic pools. Has to do with fix for this #6570 . Wierdly there is a guid instance_name in dm_os_performance_counters that isnt in sys.databases. I can work around it easily but want to figure out why before masking the problem with a fix. |
On Elastic pools, sys.dm_os_perfmon_counters has counters for all databases represented by GUIDS. To resolve the GUID to a DB name have to join with sys.databases However sys.database only has a row for the current database.
After upgrading to Telegraf 1.14.0, I am unable to get the PerformaceCounters query to work with an Azure Basic teir server.
Relevant telegraf.conf:
System info:
Telegraf 1.14.0
Steps to reproduce:
telegraf --test
Expected behavior:
Output similar to with Telegraf 1.13
Actual behavior:
Additional info:
The text was updated successfully, but these errors were encountered: