Can’t Clear Cache: Error message: Maximum execution time of 60 seconds exceeded
-
Hello! I’m working on a large direct-to-consumer (D2C) eCommerce site.
Under some circumstances we’re having trouble clearing the cache sitewide.
An error of type E_ERROR was caused in line 354 of the file /home/nginx/domains/WEBSITE/public/wp-content/plugins/cache-enabler/inc/cache_enabler_disk.class.php. Error message: Maximum execution time of 60 seconds exceeded
That references this code:
foreach ( $objects as $object ) {
// full path
$object = $dir . DIRECTORY_SEPARATOR . $object;
// check if directory
if ( is_dir( $object ) ) {
self::_clear_dir( $object );
} else {
@unlink( $object );
}
}—
The most obvious solution is to increase PHP execution time. We’ll probably give that a try in the next few weeks.
In the meantime is there anything we can do to try to remediate this?
Is there any possibility of a queueing system for websites that have tons of cached files?
This plugin has worked for us for quite some time. And we haven’t updated any plugins in the last several weeks so I’m wondering what might be the cause. We ran into the issue today while trying to clear the cache under a moderate load.
A few of our specs:
- WordPress version
6.5.5
- Active theme: CUSTOM
- Current plugin: Cache Enabler (version
1.4.9
) - PHP version
8.1.29
- WordPress version
- You must be logged in to reply to this topic.