(Site now available at hidden link without the "new" as it just launched a couple of weeks ago.)
We are sometimes getting a white screen/500 error immediately upon logging on to wp-admin.
We are on Managed WordPress hosting with Liquid Web. Previously we increased the memory limit from 256M (server default) to 512M, defined in both .user.ini and wp-config.php. However, we continue to sometimes get these whitescreens.
Liquid Web server support has looked into this and they say that we are encountering these whitescreens when we reach 136M - well short of 256 let alone 512. They are suggesting this might be a problem with Toolset, possibly Views in particular. I don't know if that is actually the case but I'd like for some assistance in helping me troubleshoot further from a website/WordPress/plugin perspective.
Hi, it could be a conflict between Toolset and another plugin, or a conflict between Toolset and the theme, or it could be something going on in the database, or the server...First, I would check the wp-config.php file and make sure you have both these lines:
define('WP_MEMORY_LIMIT', '512M');
define( 'WP_MAX_MEMORY_LIMIT', '512M' );
The second one is often overlooked and applies directly to the admin area. If that does not resolve the problem, please activate WP_DEBUG and server logs, then tell me if any more details can be found. If you're not familiar with server logs, I can show you how to activate them. Go in your wp-config.php file and look for define(‘WP_DEBUG’, false);. Change it to:
define('WP_DEBUG', true);
Then add these lines, just before it says 'stop editing here':
ini_set('log_errors',TRUE);
ini_set('error_reporting', E_ALL);
ini_set('error_log', dirname(__FILE__) . '/error_log.txt');
When a 500 error is generated, this should write out an error_log.txt file in the root directory of your site with some details about the problem. Please leave the logs running until you encounter a 500 error, then send me the contents of that file. Then you can revert the changes you made to wp-config.php.
Christian,
Thanks for the reply. I did not have WP_MAX_MEMORY_LIMIT set, so that's the first step I took. However, the white screen still occurs upon logging in. A single refresh then sends me to the Dashboard.
I enabled debugging as instructed, and now I get this error - consistent with what I believe our server support was seeing in their logs earlier.
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 12288 bytes) in /home/s7/html/wp-includes/media-template.php on line 130
Thanks for any light you can help to shed on this.
More info:
I tried it again and got a different but similar error that reference Toolset:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 77 bytes) in /home/s7/html/wp-content/plugins/types/vendor/toolset/toolset-common/inc/toolset.assets.manager.class.php on line 72
Okay thanks, at first glance it appears there is a memory limit of 128Mb enforced somewhere on the server, whether it's in the php.ini configs, the nginx configs, or a more global setting that the host manages...it's difficult for me to say. Here are some troubleshooting steps you can try:
- Temporarily deactivate all plugins except Toolset, and activate a default theme like Twenty Seventeen. Try to reproduce the error. If it's not possible to reproduce, reactivate your theme and plugins one by one until the problem reappears.
- If the problem still occurs with a default theme and no other plugins active, we can try creating a clone of the site that I can deploy locally, where the server environment is known to be working in the proper memory configurations. If the problem is not reproducible, then we know the only difference between the guts of our sites is the server where they are hosted. I can activate private reply fields here so you can share login credentials if necessary.
Christian,
Thank you. I went to a staging site and checked everything as you suggested. The theme didn't seem to make a difference, so I moved on to plugins. After disabling all and then turning them back on one at a time, I nearly made it through the entire list before a plugin that I wouldn't have suspected gave me the 500 error. I confirmed this on both the live and staging sites...when it was disabled (and everything else was enabled) I didn't get the error anymore.
The plugin was an XML sitemap plugin that I've used dozens of times without issue before. But thankfully there are plenty of alternatives out there, so I've just uninstalled the problem plugin in favor of a different one. For now I think everything is good.
Thank you for your help. Since the server tech suspected a possible Toolset issue I came to you, but ultimately it ended up being not Toolset nor the server. And it's probably not the plugin's fault as much as a conflict with something else I'm doing on the site, but if installing an alternative plugin alleviates the situation that's good enough for me. Thanks!