Differences

This shows you the differences between two versions of the page.

Link to this comparison view

litespeed_wiki:troubleshooting:stderr.log-fill-up-disk [2019/01/21 18:58]
Jackson Zhang created
litespeed_wiki:troubleshooting:stderr.log-fill-up-disk [2019/01/21 19:36]
Lisa Clarke Copyediting
Line 1: Line 1:
-====== ​Stderr.log outputs many PHP warning messages which consume a lot of disks ======+====== ​Error Log Fills Up Disk ======
  
-A user is seeing the server'​s main stderr.log growing very fast and are filling up the disk space rapidly+The server'​s main ''​stderr.log''​ is growing very fast and is filling up the disk space rapidly, like so: 
  
   34G /​var/​log/​apache2/​stderr.log.2019_01_07   34G /​var/​log/​apache2/​stderr.log.2019_01_07
Line 17: Line 17:
   5.9G /​var/​log/​apache2/​stderr.log.2019_01_09   5.9G /​var/​log/​apache2/​stderr.log.2019_01_09
  
-By checking ​the stderr.log, there are many PHP warning messages:+When you check the contents of ''​stderr.log''​ you see many PHP warning messages:
  
   PHP Warning: next() expects parameter 1 to be array, null given in /home// /​wp-includes/​class-wp-hook.php on line 291   PHP Warning: next() expects parameter 1 to be array, null given in /home// /​wp-includes/​class-wp-hook.php on line 291
Line 24: Line 24:
   PHP Warning: next() expects parameter 1 to be array, null given in /home// /​wp-includes/​class-wp-hook.php on line 291   PHP Warning: next() expects parameter 1 to be array, null given in /home// /​wp-includes/​class-wp-hook.php on line 291
  
-The PHP warning messages ​are from different shared hosting users but all logged to the main server stderr.log log.  +The warnings ​are from different shared hosting users but all are logged to the main server ​''​stderr.log'' ​log. 
-We believe the excessive stderr log is due to PHP change: PHP engine generates a lot of error/​warning messages+
  
-How to stop this?+We believe the excessive logging is due to a PHP change. The PHP engine generates a lot of error/​warning messages. So, how do you stop this?
  
-===== Upgrade ​to the latest build of 5.3.5 and above and disable stderr.log ​===== +===== Upgrade and Disable Entirely ​===== 
  
-Please upgrade ​to the latest build of 5.3.5 and above, ​and disable stderr Log settings ( LSWS Admin Panel -> Server ​-> Log -> Enable stderr Log -> No).+Upgrade ​to the latest ​LSWS build (version ​5.3.5 or above)navigate to **LSWS Admin Panel > Server > Log** and set **Enable stderr Log** to ''​No''​. This should stop writing error output to ''​stderr.log''​.
  
-The latest LSWS version should stop such PHP warming output to stderr.log.+===== Disable only for PHP =====
  
-===== LSAPI_STDERR_LOG=/​dev/​null ===== +If you only want to stop PHP-related error reporting in ''​stderr.log''​, you can leave **Enable stderr Log** set to ''​Yes'',​ and then add special environment variable to LSPHP external application configuration:​
- +
-If you only want to stop PHP related error/​warning ​reporting in stderr.log, you can add special environment variable to lsphp external application configuration:​+
  
   LSAPI_STDERR_LOG=/​dev/​null   LSAPI_STDERR_LOG=/​dev/​null
  
-It can discard PHP generated ​log message.+This will discard PHP-generated ​warning messages.
  • Admin
  • Last modified: 2019/01/21 19:36
  • by Lisa Clarke