500 error due to PHP memory_limit… but limit is higher

Turns out this was Divi Builder. No idea why it forces a 256M limit like that. In case anyone needed more proof Divi is garbage…

Maybe that was the memory limit that is set by WordPress ?
The profiler tries to disable any limit but if it failed (server restriction etc), you’re facing the limit sets by WP.

  • This reply was modified 1 hour, 46 minutes ago by nintechnet.

I’m quite certain the issue stems from this Divi file: core/components/Portability.php with this function:

        protected function prevent_failure() {
                @set_time_limit( 0 );

                // Increase memory which is safe at this stage of the request.
                if ( et_core_get_memory_limit() < 256 ) {
                        @ini_set( 'memory_limit', '256M' );

I’m betting that 1) this is hooked in late and so other parts of WP don’t see it because the limit hasn’t been set yet, and 2) it’s failing to get the current limit properly.

If you ask me Divi should absolutely not be doing this. If they’re encountering memory limit issues they should warn the user that the limit is too low, not try to force a new limit… that itself is too low. I find this typical for Divi programming though: trying to be too user friendly and shooting itself in the foot.

Also, I know it’s Divi because disabling the Divi Builder plugin completely resolved the issue. Also made the entire WP admin and loading uncached pages way faster.

  • This reply was modified 21 seconds ago by websavers.


This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer