• Resolved nosilver4u

    (@nosilver4u)


    Hi,

    I was working on something yesterday on a site with QM installed, and kept getting 502 errors from my site. After a lot of investigation with my web host, it was determined that it was a memory error, and I believe we’ve narrowed it down to QM and Types (Toolset). My suspicion is that because Types is throwing a bunch of PHP deprecations, QM is using up too much memory in storing the debugging info and exhausts the available memory.

    Otherwise, the site has a 512MB memory limit, and normally uses around 50-60MB (per QM’s stats). But when attempting to submit settings changes, activate plugins, purge caches, any sort of “action” request, then I get the memory issues.

    I believe there are a couple other plugins that have PHP deprecations also (running on PHP 8.4), so perhaps it is a cumulative effect, but I’m not certain.

    Any ideas on how to narrow this down further, or make it so QM doesn’t suck up all the memory?

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    Yeah a large number of PHP errors can eat up memory due to the size of the stack trace that’s collected alongside each one. Query Monitor version 4 reduces that memory usage considerably, but it’s still potentially unbounded.

    The nuclear option is to disable error handling in QM completely:

    define( 'QM_DISABLE_ERROR_HANDLER', true );

    Not ideal, but it’ll allow you to use all the other panels in QM.

    Short of changing the way QM transiently stores the data that it collects, there’s not really anything I can do about this. Any attempt to put a limit on the number of queries or errors that QM collects immediately makes it less useful when you inevitably need to see that information.

    QM also allows you to hide errors from certain plugins or themes, but this doesn’t stop the data being collected, it just prevents the admin toolbar from showing a coloured notification. Perhaps I need to introduce a new option for completely bypassing the collection of errors from certain plugins and themes.

    Thread Starter nosilver4u

    (@nosilver4u)

    Hmm, while that isn’t ideal, it might help narrow things down. Besides error reporting, it’s entirely possible the issues are related to db queries or something else that is happening on those requests.

    I’ll try it out and see if the issue is indeed from the error handler, or somewhere else. Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.