• I have a WP Multisite installation (with only one site active) that has over 100k images.

    As the products were imported to the site, the thumbnails were created with no issue. Then we decided to change the theme, layout and as we were running out of space we delete the thumbnails.

    The plugin was stuck in the loading… phase for hours.

    Then I run via wp cli the wp media regenerate –only-missing command but there we get the following error:

    mmap() failed: [12] Cannot allocate memory

    mmap() failed: [12] Cannot allocate memory
    Fatal error: Out of memory (allocated 1762754560) (tried to allocate 20480 bytes) in /home/customer/www/carro.gr/public_html/wp-includes/meta.php on line 1176

    The allocated memory is 8GB and contacted my ISP to be told that:

    the current memory_limit for the website is 8G which is quite enough. I have executed the command on my end and monitored the logs on the server. During the command, the server had more than 7G available RAM, please verify that from the following log:
    
    [email protected]:~$ free -mh
                 total       used       free     shared    buffers     cached
    Mem:           21G        13G       7.5G       1.6G         0B       3.7G
    
    Given that, the website does not seem to be reaching any limits on the server-side. The reported issue might be rather related to a plugin/theme configuration that interferes with the wp media regenerate command.
    
    Note that error messages:
    
    Out of memory (allocated 1762754560) (tried to allocate 20480 bytes)
    
    states that 1762754560 bytes were allocated (which is 1.6 G) and it's far away from the memory_limit. In case you have recently performed some custom modifications to the website or installed plugins/themes, please try reverting them. Otherwise, you can try disabling some of the plugins and execute the command again.

    I disabled all plugins, changed the theme to default (2022) but the issue persists. The ISP suggested that this may be due to the multisite nature of the installation.

    I will be most gratful for your thoughts.

  • The topic ‘Multisite installation with over 100k images’ is closed to new replies.