Support » Plugin: Interactive Content – H5P » H5P Interactive Videos – Fatal error: Out of memory

  • Resolved divaksh


    I facing a strange issue with the H5P interactive videos, we have around 150 videos on our site. Whenever someone watches those videos, after 1 or 2 videos WordPress stops working and it gives an error Fatal error: Out of memory (allocated 27262976) (tried to allocate 32768 bytes) even after having sufficient resources. To resolve this we have to restart the XAMPP services.

    Here is more info about the server and the status of the server during this white screen of death.
    System : Windows Server 2012 R2 Standard Edition (VM instance)
    Memory used by PHP : 2 MiB
    Memory usage (system): 3.19 GiB / 8 GiB (39.846705108812%)
    CPU Load : 1%

    It is a wordpress network setup which is running only one wordpress website, I have already increased the WordPress PHP memory limits.
    define( ‘WP_MEMORY_LIMIT’, ‘3144M’ );
    define( ‘WP_MAX_MEMORY_LIMIT’, ‘3144M’ );

    Please guide me to right direction, what is causing the error and how to fix it?

    • This topic was modified 5 months, 1 week ago by  divaksh.
Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author icc0rz


    I think the issue is the memory limit in php.ini. It appears the current memory limit is around ~27MB, which is a bit low, I would at least try 64MB or even better: 128MB.
    The line should look like this:

    memory_limit = 128M

    To check the actual limit you can create an info.php file containing:

    <?php phpinfo(); ?>

    Note that there can be multiple php.ini files but only one is used.

    You can also set this in your .htaccess file

    php_value memory_limit 128M

    But I wouldn’t recommend it:

    • This reply was modified 5 months, 1 week ago by  icc0rz.

    First of all, thank you for the quick response. 🙂

    PHP memory limit is also set to the 1024MB.

    max_execution_time 300 300
    max_file_uploads 200 200
    max_input_nesting_level 64 64
    max_input_time 300 300
    max_input_vars 3000 3000
    memory_limit 1024M 1024M
    open_basedir no value no value
    output_buffering 4096 4096
    output_encoding no value no value
    output_handler no value no value
    post_max_size 1024M 1024M
    precision 14 14
    realpath_cache_size 4096K 4096K

    • This reply was modified 5 months, 1 week ago by  divaksh.
    Plugin Author icc0rz


    Did you check the limit via phpinfo()?
    If that is OK then there is some other software restricting PHP from allocating memory.

    Yes, I checked it with phpinfo(). (

    What can be that other software any hint or idea?

    Plugin Author icc0rz


    It’s tough for me to say as I’ve got little experiencing hosting PHP on Windows.
    There could also be a physical issue with one of the memory stick as well. Or a bug in the XAMPP version you’re running meaning there’s an issue freeing up the memory after use (since the page works again after restarting XAMPP). It could also be that there are simply too many simultaneous Apache workers that are using up all the memory.
    Since you mention the problem is when streaming videos it could be related to how Apache is set up to stream the videos.

    Try to use the Task Manager or another app to track the memory usage when the problem arises. Try to determine what is using memory and how many processes/threads there are.

    Note that I see many people in other forums saying that XAMPP is not suited for production environments. So you should make sure that all of the services are configured and set up according to recommended guidelines for hosting WordPress.

    Thank you so much for being so helpful and sharing knowledge. I have also read the same on official website under question Is XAMPP production ready?. We will move to the another solution or maybe LAMP. Please could say few words on H5P performace with Nginx?

    Plugin Author icc0rz


    In a 1:1 comparison with Apache you will always get better performance and support more traffic on the same hardware using Nginx. This goes for H5P as well.
    It’s been like this for a while and I don’t think Apache will catch up anytime soon.
    On the other side, there is a learning curve if you’re not familiar with Nginx. You’ll have to configure and set up a separate software PHP-FPM that receives all of the PHP requests.
    Many VPS hosting providers offer prebuilt Linux images with Nginx and WordPress making it a breeze to set up and get started.

    Once again thank you. 🙂

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.