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
top_contributors_questions DB queries are too expensive to include in questions_list view #3373
Comments
We had a great discussion about this and we think we have a good path forward. The deal is this: The query above generates the "Top Contriburors" list on the questions list pages (there is one for every product, and one for all products). This feature is revealed by hovering over the "Top Contributors" button on the list page on the right side: Due to the fact that this feature is hidden-by-default and is causing downtime and some significant developer resources we propose the following:
|
…ons pages. - Also remove top contributors list from mobile view.
We have had repeated performance problems where the DB CPU gets stuck near 100% due to queries similar to the following:
While the CPU is spiking, I could see many, many examples of this query in a MySQL
show processlist
, and you can also see an example of this query (and the ~20 sec execution time) in NRI believe this query is from top_contributors_questions utility function called by the question_list view. The results of this query are cached for 15 minutes, but when there is a cache miss the repeated attempts to update the cache (especially when particularly aggressive bots are scanning the site) cause the DB to max out the CPU and have required manual intervention to bring the site back to acceptable performance levels.
The text was updated successfully, but these errors were encountered: