• Site recovered – sorry for the inconvenience

    Sometime on the 12th my site started to produce a series of PHP Fatal errors saying “Allowed memory size of 41943040 bytes exhausted.”. This was a bit of a surprise. It means that my memory limit was 40M, a lot lower than the expected value of 256M.

    Other times the response was

    [13-Jul-2016 02:54:59 UTC] PHP Fatal error:  Unknown: 
    Cannot use output buffering in output buffering display handlers in Unknown on line 0

    Problem recovery

    To recover from this problem I used ftp to rename Jetpack to Jetpack-f. I was then able to access the site.

    Problem explanation

    • The site was migrated from one host to another.
    • The PHP version on the new host was 5.4.45.
    • The memory_limit was set to 25M.
    • For PHP 5.3, 5.5 and 5.6 the memory_limit would have been 256M; a much nicer number.
    • By the time WordPress started up the memory limit became 40M.
    • It’s WordPress that sets this limit, depending on the site. For WPMS it’s 64M. See [api wp_initial_constants].

    I’ve yet to track down the specific plugin/module combination that causes WP to exceed the 4OM limit.

    Other notes

    • My oik-bwtrace plugin reports the memory limit on its admin page.
    • This is 256M, since WordPress sets it higher in admin pages. Using [hook admin_memory_limit] in wp-admin/admin.php.
    • I’ve changed my [bw_code wp] shortcode to display the memory limit on the front-end.
    • For this site the memory_limit has already been set by the hosting company to a high value.
      WordPress 6.2.1. PHP: 8.0.28. Memory limit: 768M
    • I’m also experimenting with code that displays the current memory_limit in trace records produced by oik-bwtrace. They already optionally display current and peak memory usage, so adding the current memory limit is no big deal.

    , ,


    Last updated:

    July 18, 2016


Tide times from tidetimes.org.uk

Tide Times & Heights for Langstone Harbour on
28th May 2023
06:01 High Tide ( 3.76m )
12:14 Low Tide ( 1.97m )
19:24 High Tide ( 3.99m )

Tide times from tidetimes.org.uk

Tide Times & Heights for Northney on
28th May 2023
06:20 High Tide ( 3.46m )
12:05 Low Tide ( 1.67m )
19:03 High Tide ( 3.66m )
WordPress version:6.2.1
Gutenberg version:15.8.0

Summary file