Carmelina Posted June 4, 2020 Share Posted June 4, 2020 I am having issues with my website getting errors occasionally (not consistent, every 4th page or so). When I check the error log I get the following message: [04-Jun-2020 14:57:22 UTC] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /home/sitename/public_html/wp-includes/meta.php on line 964 99% of the time it is line 964, rarely it is line 960. I really dont think this has to do with memory size as our memory is set to 512M, I thought it might have been an issues with W3 total cache, but deactivating the plugin didn't seem to have any affect. Here is the meta.php code from line 949-964. if ( ! empty( $meta_list ) ) { foreach ( $meta_list as $metarow ) { $mpid = intval( $metarow[ $column ] ); $mkey = $metarow['meta_key']; $mval = $metarow['meta_value']; // Force subkeys to be array type. if ( ! isset( $cache[ $mpid ] ) || ! is_array( $cache[ $mpid ] ) ) { $cache[ $mpid ] = array(); } if ( ! isset( $cache[ $mpid ][ $mkey ] ) || ! is_array( $cache[ $mpid ][ $mkey ] ) ) { $cache[ $mpid ][ $mkey ] = array(); } // Add a value to the current pid/key. $cache[ $mpid ][ $mkey ][] = $mval; I am fairly new to this so any help is really appreciated as I am just trying to help fix my family's business website Thanks! Quote Link to comment Share on other sites More sharing options...
gw1500se Posted June 4, 2020 Share Posted June 4, 2020 Did you try increasing the memory limit anyway? I always set mine to 1024M. Quote Link to comment Share on other sites More sharing options...
kicken Posted June 4, 2020 Share Posted June 4, 2020 23 minutes ago, Carmelina said: as our memory is set to 512M No it isn't. It's set to 128MB according to your error message. 23 minutes ago, Carmelina said: Allowed memory size of 134217728 bytes exhausted 134217728 bytes = 128MB Make sure you're editing the correct php.ini file, use phpinfo() to find it if necessary. Quote Link to comment Share on other sites More sharing options...
Carmelina Posted June 4, 2020 Author Share Posted June 4, 2020 1 minute ago, kicken said: No it isn't. It's set to 128MB according to your error message. 134217728 bytes = 128MB Make sure you're editing the correct php.ini file, use phpinfo() to find it if necessary. You're right, I just noticed after posting I was looking in the wrong folder and there is no php.ini for the correct/live version of my website. I have a dedicated server with host gator but even in WHM I cant find the PHP Configuration Editor that I am supposed to have access to. Im and on hold with support, hopefully I can get the memory limit raised. Quote Link to comment Share on other sites More sharing options...
gw1500se Posted June 4, 2020 Share Posted June 4, 2020 What editor? I just use 'vim' to edit /etc/php.d/php.ini. Quote Link to comment Share on other sites More sharing options...
Carmelina Posted June 4, 2020 Author Share Posted June 4, 2020 I got the memory limit increased. No errors so far, such a silly over sight, looking at the wrong folder thank you both for replying!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.