Snapshot dashboard is showing 500 error

When I visit snapshot dashboard page, it shows 500 error page.

Error in debug: > PHP Fatal error: Out of memory (allocated 180097024) (tried to allocate 2101248 bytes) in /home/sites/irishairandbeauty.co.uk/public_html/wp-includes/functions.php on line 435

Though I have added WP_MEMORY_LIMIT and WP_MAX_MEMORY_LIMIT but didn’t work.

  • Lindeni Mahlalela

    Hello Paul

    I hope you are doing great today. I am sorry that you are having issues using our Snapshot plugin. We are very sorry for all the inconvenience that this might have caused.

    I have checked your setup and everything seems to be fine according to what I see. All limits seem to be set higher than the recommended minimum but still Snapshot fails. I have checked the error logs and traced the error, it seems the error occurs when Snashot Pro calls the core WordPress function:

    maybe_serialize( $data ) which is located in the 'wp-includes/functions.php', this function calls the native PHP function 'serialize()' like this:

    function maybe_serialize( $data ) {
    	if ( is_array( $data ) || is_object( $data ) )
    		return serialize( $data ); //Line 435: it is on this line where the script runs out of memory
            //rest of the function
    }

    The function 'serialize()' is a PHP function defined in PHP Core not in Snapshot and not in WordPress which means neither WordPress nor Snapshot can control how much memory it uses. At this point it seems very reasonable to contact your host and ask them to check in their system logs what causes this function to fail. Your host can also help you troubleshoot server related limits as it is possible that their system employs resource limits that cannot be overridden by user defined variables.

    We have tried to raise the memory limit using WordPress constants:

    define( 'WP_MEMORY_LIMIT', '1024M' );
    define( 'WP_MAX_MEMORY_LIMIT', '1024M' );

    and php.ini/.user.ini values:

    memory_limit = 2048M

    I even set it as high as 8000M and the server's Master value of 3000M but nothing helped. Could you please contact your host and ask if there is any limit on the system that could result in the 'serialize()' function to run into issues.

    I hope to hear what the host says and hope we resolve this soon. Please let us know if you have any further questions regarding this.

    Have a nice day.
    Mahlamusa

  • Lindeni Mahlalela

    Hello Paul

    I hope you are doing great today. I was informed by a developer that it is possible that these limits are specified in Apache server configuration, in which case it does not matter what the PHP limits Apache server will always use its own limits. Could you please ask your host about the value of:

    RLimitMEM

    In Apache configuration, this value defines how much memory Apache can use. If this value is low, PHP and thus WordPress and its plugins will be limited by this value. Please ask your host if they have this set to a low limit, if so please ask if they can raise it a little to allow WordPress and its plugins to run without hitting the memory limit.

    I hope this helps. Please let us know what your host says and let us know if you have any further queries.

    Have a nice day.
    Mahlamusa

  • Lindeni Mahlalela

    Hi Paul

    I hope you are doing great today. Thank you for the feedback.

    HI there thanks for reply, ill ask but id have thought it wasn't an issue as I do use the plugin on 10 other sites ok

    Are these sites running on the same host, same server and same hosting package? If yes it might be due to a plugin used on this site that is not used on others. I think if the sites are on the same host, same server and same hosting package then you should not have problems if you have no issues on other site. If the websites are on different server then you can ask your host to move your website to a server that has no issues running Snapshot.

    Regarding the memory limits our shared servers do have a memory allocation cap of 512M

    This means raising the memory beyond 512M will have no effect on the memory. Please note that this limit will include both the Apache Server and PHP Engine, so if Apache is already using too much of this memory then PHP will fail if it try to allocate memory and find that there is already not enough free memory to be allocated.

    As a way forward, I suggest you ask your host if other hosting packages will have the memory limit and find out if upgrading can solve the issue. If all your websites are hosted by the same host, please mention this to them so they can try to figure out why the memory is not affecting Snapshot on the other websites.

    I hope this helps. Please let us know if you have any further queries or feedback from the host, we are always happy to help.

    Have a nice day.
    Mahlamusa

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.