• I have a comment to the memory issue yet original topic is closed. In original topic it says correctly that out of memory issue is caused when there’s too many db queries to be logged. And that is true yet it does not resolve the issue. I will give an example. Imagine we have a request to wc-api/v3/products and with query monitor plugin disabled it uses 70MB of the memory (so less than 128M which is just fine) with query monitor plugin enabled it uses more than 512M of memory (because there is plenty of queries to be logged in).

    My thoughts here are two. First of all with requests as such we have no chance or probably intention to see any query monitor output yet it is not easy to disable it just for such requests (i think the only one is to set up if-wc-api then set QM_DISABLED constant in wp-config. My second thought is that maybe query monitor could check that it closes quickly to out of memory and to stop logging db queries when it does reach certain level?

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

    (@johnbillion)

    WordPress Core Developer

    Thanks for the message. I’ve started to tackle this here with a feature that allows the collection to be ceased at any point, and data that’s been collected so far to be discarded.

    It solves the problem of having to define QM_DISABLED very early on. Once that feature is complete then I’m going to add some default behaviour so data collection ceases as soon as QM is able to determine the current user, and able to determine that the current user cannot view QM, or that a request is being performed where QM won’t output its data.

    This will reduce memory and processing significantly.

    No ETA on this just yet, but hopefully soon.

Viewing 1 replies (of 1 total)
  • The topic ‘Idea around “Fatal error: Allowed memory size of ** exhausted”’ is closed to new replies.