Resource icon

Slow query logger 1.3.1

No permission to download
Browsing my Member List page generates slow query log also :D (1.4xx seconds to load :/ )
So I disable Member List Page :).

Hmm, not for me. Maybe you have extra addons? We can make a list of addons mentioned in these logs to find common problems. I saw..

- AD Credits
- Lazy Image Loader
- BB Code Manager
- Siropu Chat
- Live Feed (by Milano)

Not a lot of times though.
 
No slow queries since disabling Lazy Image Loader which appeared frequently in logs. Strange.
Lazy Image Loader shouldn't be doing any queries, but it may be in the path for something which does if you have image proxy enabled.

If I want to change it to 0.5 seconds, code will be?
PHP:
<?php

class SV_SlowQueryLogger_Profiler extends Zend_Db_Profiler
{
    protected $reportSlowQueries = false;
    protected $slowQuery = 0.5;

    public function __construct($reportSlowQueries = true, $slowQuery = 0.5, $enabled = false)
Line 6 and 8 should be modified?
Just line 8.
 
Last edited:
  • Like
Reactions: rdn
Running for 7 hours now and no slow query has been logged.
I'll change it to 0.5, lets see how it goes :D.
 
It would be really helpful if this would expose the slow queries in a slow request. It seems that after a slow query report its needed to open debug mode and to manually review all queries in the page request.

Also: I am encountering slow query reports which after inspection of debug output does not include any slow queries.
 
Last edited:
It would be really helpful if this would expose the slow queries in a slow request. It seems that after a slow query report its needed to open debug mode and to manually review all queries in the page request.
This was designed to help troubleshoot some add-ons which only did a few queries rather than a complete end-to-end request performance profiling/monitoring.

Do you anything like DataDog (metrics as a service, with a local collection agent. Rather pricy for more than 5 servers)? I could work this sort of reporting into a paid telemetry add-on if it had somewhere to push it to (such as a StatsD/CollectD server).

Also: I am encountering slow query reports which after inspection of debug output does not include any slow queries.
This add-on measures wall-time from start of the query to the end of the query execution (doesn't include data fetching), rather than the MySQL reported query time. So CPU scheduling latency may cause false(?) positives.
 
Last edited:
Could you add IP & user-agent to the log? I am getting a lot of slow queries which may be caused by scrapers.
 
Could you add IP & user-agent to the log? I am getting a lot of slow queries which may be caused by scrapers.
At the moment this uses the standard XenForo error log to capture details. Logging any more information would likely require some additional admin-ui.
 
Back
Top Bottom