Support

Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
All Topics
Harald

out of memory and 500 errors with 2.2.2

we upgraded from:
ac-addon-acf-2-2-1
admin-columns-pro-4-2-3.zip

to:
ac-addon-acf-2-2-2
admin-columns-pro-4-2-8.zip

and using the above new versions, we encountered many 503 – like when you clicked arround on comments (switching from spam to published) if you do this back and forth – every ~4-5 try wordpress serves a 503/500 – and in the error log it shows an out of memory.

disabling the ACP plugins, fixes the issue.

is there a git log / diff – we can bisect into?

db info:
12mio. wp_postmeta

the provided changelog says “core changes”

6 years ago
Stefan van den Dungen Gronovius
Developer

Hi Harald.

Both the pro and acf repos are private so I can’t give you acces to whose repos to bisect the revisions.
But do you have this issue only after you updated to the latest versions and when you click around in the comments overview? You don’t have any issues on other overview pages? Can you send me an export of your columns sets for comments? Please send them to support@admincolumns.com.

6 years ago
Harald

i have the issue – all over the place. i just picket the comment as a sample as it is one of the place we havent customized too much.

and as said before, disabling the plugin or downgrading back to 4.2.3 and /2.2.1 fixed it.

i suspect a WPQuery that returns too much records, which leads to the OOM.
WPQuery is generally a no-go thing in our setup, as we have so many postmeta records.

fun-fact aside, while trying to export the columns settings clicking on: /wp-admin/options-general.php?page=codepress-admin-columns

i see this query – hanging around – taking ages.
`
SELECT DISTINCT mt.meta_key FROM wp_posts AS pt INNER JOIN wp_postmeta AS mt ON mt.post_id = pt.ID WHERE 1=1 AND pt.post_type = ‘attachment’ ORDER BY mt.meta_key ASC
`

here is the export: https://gist.github.com/hjanuschka/8b55c7da6d39684eff1fe2358b267142

as you can see its pretty simple. there is no real magic in our columns, just the fact that we have a wp_postmeta from hell.
so my guess is on some “doesnt matter” wpquery has been added, but its hard for me to diff/bisect, without a git repo.

6 years ago
Stefan van den Dungen Gronovius
Developer

As discussed on our live chat, we believe the culprit is in the latest changes related to our filtering methods. To get the filtering options for the drop-downs, we have to do some heavy queries. This may take long for large datasets and that’s why we cache these results. In the latest version we reduced the time from 1 minute to 10 seconds and that probably causes the issue.

With the following filter it will be possible to extend the caching time.

add_filter( 'acp/filtering/cache/seconds', function( $seconds ){ 
  return 300; // 300 seconds
}

We’re currently looking for a solution to set the cache for an even longer time and clear the cache manually by a button or trigger with for example wp-cli.

6 years ago

You must be logged in to reply to this topic.