Jump to content

IPS\core\Achievements\_Badge::getBadgeStats Hogging Database


Go to solution Solved by Nathan Explosion,

Recommended Posts

Posted

Our advice at present can only really be to contact you host to get this resolved. The query itself is quite a simple query that is run on thousands of communities. We are unable to advise on the disabling of functions which are built to ensure the software runs as designed

Posted
11 minutes ago, Nathan Explosion said:

Just pointing this one out...

 

That is indeed still an open bug report. However as mentioned, this is causing issues on very very few environments. While we have no issue with improvements that can be made within the platform (and thats been reported as such), servers should be able to handle the query really.

Posted
44 minutes ago, Marc said:

servers should be able to handle the query really.

i agree but it's not being handled and this is on a 16 core & 32 threads AMD Epyc. i don't think this is a server issue.

Posted
19 minutes ago, David.. said:

i agree but it's not being handled and this is on a 16 core & 32 threads AMD Epyc. i don't think this is a server issue.

Keep in mind, you can have a super computer but if it's not configured correctly, you won't take full utilization of what's available. You will want to review your configuration to see what is happening.

  • Solution
Posted (edited)

@David.. I know you indicated you had uninstalled the resource, but if you are still using my application then you should turn off the "Show 'Rare' tag on badge?" settings that are available in the application settings. When generating the html for a badge using IPS code, this setting will result in a call to the 'isRare' function in \IPS\core\Achievements\Badge, which itself calls getBadgeStats, so if you are viewing a topic where a number of people are displaying badges then it could trigger the situation mentioned in that other topic if the cached data has expired - I'll be adding something to my application to warn about this behaviour.

Also - if you ever need my assistance to check an issue with my resources then contact me on the site from which you downloaded the resource. I'm no longer on here regularly, so mentioning me isn't going to achieve much. Report on my own site = I see it.

If anyone else wants to try to reproduce multiple calls to the getBadgeStats function, then it can be done by going to a user profile for someone who has rare badges, and then refreshing multiple times at the same time as the expiry of the cached stats.

Edited by Nathan Explosion
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...