First, turn on
WP_DEBUG to get a log of the issue. In your wp-config.php you can add something like:
define('WP_DEBUG', true); //record all the errors define('WP_DEBUG_LOG',__DIR__.'/wp-content/.wp-debug.log'); //you may want to move this to a more secure location (outside of the web root) define('WP_DEBUG_DISPLAY', false); //don't show errors on the front end
Second, depending on your server setup, the
memory_limit settings may not match what is used by apache/litespeed/nginx/etc when you use the command line. From the command line, try running
php -i | grep "max_execution_time" and
php -i | grep "memory_limit" to see what those get set to.
Third, I’ve noticed that
wp_site_health_scheduled_check occasionally takes FOREVER to complete (3 to >60 seconds depending on the day). I suspect you are hitting the
Best of luck!