Title: Log errors causing high server usage
Last modified: October 11, 2020

---

# Log errors causing high server usage

 *  Resolved [sprocker](https://wordpress.org/support/users/sprocker/)
 * (@sprocker)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/log-errors-causing-high-server-usage/)
 * I am getting the following errors:
 * mod_fcgid: stderr: PHP Warning: A non-numeric value encountered in /var/www/vhosts/
   domainname.co.uk/httpdocs/wp-includes/media.php on line 468
 * mod_fcgid: stderr: PHP Warning: A non-numeric value encountered in /var/www/vhosts/
   domainname.co.uk/httpdocs/wp-includes/media.php on line 458
 * I have tried the site with no plugins and the basic theme but I keep getting 
   the warning…
 * Also added this to the config file:
    ini_set(‘display_errors’,’Off’); ini_set(‘
   error_reporting’, E_ALL ); define(‘WP_DEBUG’, false); define(‘WP_DEBUG_DISPLAY’,
   false);
 * WordPress and Plugins all up to date
 * What can be causing this? how do I stop it? thanks
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Flog-errors-causing-high-server-usage%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/log-errors-causing-high-server-usage/#post-13520483)
 * See if this can points in the right direction: [https://stackoverflow.com/questions/42044127/warning-a-non-numeric-value-encountered](https://stackoverflow.com/questions/42044127/warning-a-non-numeric-value-encountered)
 *  [Kenneth X Estrada](https://wordpress.org/support/users/kxeo1/)
 * (@kxeo1)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/log-errors-causing-high-server-usage/#post-13520777)
 * This is a scripting error. It seems like something or somebody modified your 
   media.php file and now is broken.
 * Therefore, adding the display errors:off script in your config file wont do anything
   because its a core script error and not part of the error logs.
 * Follow the path this error is giving you, than copy what is on that line and 
   post it here and tag me. I will take a look and see the issue more in depth.
 *  Thread Starter [sprocker](https://wordpress.org/support/users/sprocker/)
 * (@sprocker)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/log-errors-causing-high-server-usage/#post-13521880)
 * thanks!!!
    first error:
 * // Calculate the larger/smaller ratios.
    $smaller_ratio = min( $width_ratio, 
   $height_ratio ); $larger_ratio = max( $width_ratio, $height_ratio );
 * ==> 458: if ( (int) round( $current_width * $larger_ratio ) > $max_width || (
   int) round( $current_height * $larger_ratio ) > $max_height ) {
    // The larger
   ratio is too big. It would result in an overflow. $ratio = $smaller_ratio; } 
   else { // The larger ratio fits, and is likely to be a more “snug” fit. $ratio
   = $larger_ratio; }
 * Second error:
 * // Very small dimensions may result in 0, 1 should be the minimum.
    $w = max(
   1, (int) round( $current_width * $ratio ) ); ==> 468 $h = max( 1, (int) round(
   $current_height * $ratio ) );
 *  Thread Starter [sprocker](https://wordpress.org/support/users/sprocker/)
 * (@sprocker)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/log-errors-causing-high-server-usage/#post-13522986)
 * Thanks for the advice!
 * Turned out it was some old core code that was no longer needed in the later versions
   of WordPress that was triggering the error.
 * Very impressed with my host, 34sp for getting to the bottom of it and sorting
   it for me!
 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/log-errors-causing-high-server-usage/#post-13523956)
 * Glad its sorted 🙂

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Log errors causing high server usage’ is closed to new replies.

## Tags

 * [error logs](https://wordpress.org/support/topic-tag/error-logs/)
 * [media.php](https://wordpress.org/support/topic-tag/media-php/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 3 participants
 * Last reply from: [t-p](https://wordpress.org/support/users/t-p/)
 * Last activity: [5 years, 7 months ago](https://wordpress.org/support/topic/log-errors-causing-high-server-usage/#post-13523956)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
