question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using MSSQL overloads SQL server

See original GitHub issue

When i started up Dependacytrack container i noticed that the MSSQL server was using 100% CPU.

Current Behavior:

Dependacytracker seems to be locked in a loop running the following query: (@P0 nvarchar(4000))SELECT 'org.dependencytrack.model.VulnerableSoftware' AS DN_TYPE,A0.CPE22,A0.CPE23,A0.EDITION,A0.ID,A0."LANGUAGE",A0.OTHER,A0.PART,A0.PRODUCT,A0.PURL,A0.PURL_NAME,A0.PURL_NAMESPACE,A0.PURL_QUALIFIERS,A0.PURL_SUBPATH,A0.PURL_TYPE,A0.PURL_VERSION,A0.SWEDITION,A0.TARGETHW,A0.TARGETSW,A0."UPDATE",A0.UUID,A0.VENDOR,A0.VERSION,A0.VERSIONENDEXCLUDING,A0.VERSIONENDINCLUDING,A0.VERSIONSTARTEXCLUDING,A0.VERSIONSTARTINCLUDING,A0.VULNERABLE FROM VULNERABLESOFTWARE A0 WHERE A0.CPE23 = @P0 AND A0.VERSIONENDEXCLUDING IS NULL AND A0.VERSIONENDINCLUDING IS NULL AND A0.VERSIONSTARTEXCLUDING IS NULL AND A0.VERSIONSTARTINCLUDING IS NULL

Steps to Reproduce:

Start a clean install of dependecytrack against mssql

Expected Behavior:

Environment:

  • Dependency-Track Version: 3.8.0
  • Distribution: Docker
  • BOM Format & Version:
  • Database Server:MSSQL Azure
  • Browser:

Additional Details:

This is a clean install from docker. I also see that it redownloads all external advisories every time i reboot the container, that might be related or a seperate issue.

My suspesion is that this is some sort of background job, it happens with no users active.

Screenshot of CPU usage: https://imgur.com/a/JnZC9Iq

Only warning in error log: 2:45:41.421 WARN [Datastore] Default type for java type of java.lang.Float was previously jdbc-type=FLOAT but this is not provided by the JDBC driver! Please report this to the DataNucleus developers db_1 | 12:45:41.422 WARN [Datastore] Default type for java type of java.lang.Double was previously jdbc-type=FLOAT but this is not provided by the JDBC driver! Please report this to the DataNucleus developers

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:21 (11 by maintainers)

github_iconTop GitHub Comments

4reactions
slavergne-devolutionscommented, Feb 16, 2022

It works across all queries being sent to the SQL Server database. What a difference.

All parameters received from the application are now varchar image

Query plan before/after the change (WOW) image

Thank you for the help.

3reactions
stevespringettcommented, Feb 16, 2022

Thats fantastic. I’m going to add this to the documentation. Thanks for reporting back.

Read more comments on GitHub >

github_iconTop Results From Across the Web

T-SQL User defined function overloading? - Stack Overflow
I need to write a set of functions that mimics method overloading in C#. Is function overloading supported in T-SQL in any way?...
Read more >
Is it Possible to Overload SQL Server Functions?
1 Answer 1 ... There is no straight-forward way of carte-blanche overriding a built-in function in SQL Server. You can kind of fake...
Read more >
Function Overloading in sql - MSDN - Microsoft
No, there is no way to "overload" a function. However, what you are describing can be done by creating a layer of stored...
Read more >
Overloading a Windows SQL server
Start by adding in more RAM. Go for 16 Gigs total (12 more) and see how that helps performance. Then have someone do...
Read more >
Identify Overloaded SQL Server Partitions - MS SQL Tips
I am using partitioning in my database. Is there an easy way for me to identify partitions that may have too much data...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found