Author Topic: What consumes space ???  (Read 12842 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
What consumes space ???
« on: July 30, 2016, 01:01:13 AM »
I put 3-4 of my sites on cwp in digital ocean.
Every day something eats space. On digitalocean they only 30GB, and every day come closer to the end.

I have other servers with dozens of similar sites, do not weigh almost nothing, about 13GB, there are 20 sites, and some have been around for years.

What's on cwp eating me all this space?
« Last Edit: July 30, 2016, 01:21:30 AM by alebal »

Offline
*
Re: What consumes space ???
« Reply #1 on: July 30, 2016, 12:26:00 PM »
Check the size of the logs /usr/local/apache/logs/ (i.e. use ls -la command)
These and other log files (in /var/log/ ) can eat much space.
« Last Edit: July 30, 2016, 12:29:38 PM by ripieces »

Offline
*
Re: What consumes space ???
« Reply #2 on: July 30, 2016, 07:29:11 PM »
19 gb, this log /usr/local/apache/logs/  I can not even open it to see what it says

I think it's the fault of this http://forum.centos-webpanel.com/centos-6-problems/restarted-service-cloud-config/

Can anyone help me to solve it or at least not to be included in the log?

Or is there a way to set a maximum weight of log files?

Offline
*
Re: What consumes space ???
« Reply #3 on: July 31, 2016, 12:08:44 PM »
I don't know anything that would help about the thread you linked :-(

You can use the Linux tail command to view the end of the file
tail fileNameHere

The tail command has an option on how much to display of the end of the file, use
man tail
for more info about the tail command.

Another command that might work with such big files is the less command, again check man / Google on how to navigate with it.

Which log file is exactly causing the problem? access or error log?

If it's error log, it could be that PHP errors go to the error log (that's what new PHP versions might do) and that can get huge very fast if the error is in a loop.

Offline
*
Re: What consumes space ???
« Reply #4 on: August 01, 2016, 09:07:44 PM »
thanks for the reply.
the file error_log.
With tail I was able to read a few lines. It is full of php notice.

I changed the line in php.ini
;error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
in this
error_reporting = E_ERROR | E_WARNING | E_PARSE

So I should not have notice.

It will also have effect on the log file?

I thought moving to php 7. Will I have the same problem? I'll have to re-edit php ini?

Moving from one version to all changes are saved?

Offline
*
Re: What consumes space ???
« Reply #5 on: August 02, 2016, 02:46:21 PM »
That line won't help much probably, because it will print error, warning and parse error messages then, which for old PHP code on i.e. 5.6 can still be a lot (i.e. variable x not defined but used or stuff like that).

What you need to change is the logging of PHP errors and warnings and notices into the error_log.

Try changing log_errors to Off in your php.ini:

Code: [Select]
; Besides displaying errors, PHP can also log errors to locations such as a
; server-specific log, STDERR, or a location specified by the error_log
; directive found below. While errors should not be displayed on productions
; servers they should still be monitored and logging is a great way to do that.
; Default Value: Off
; Development Value: On
; Production Value: On
; http://php.net/log-errors
log_errors = Off ; Original value for me was On

I don't recommend moving to 7.x yet, I'd expect a lot of old code that has problems with 7.x.
Also this would not solve the logging problem.
I don't know if php.ini is preserved or not when switching versions in CWP.
« Last Edit: August 02, 2016, 02:51:36 PM by ripieces »

Offline
*
Re: What consumes space ???
« Reply #6 on: August 03, 2016, 10:36:12 PM »
Turning off error log works. I do not see the log files, but at least I do not eat all the space in two days.

Thank you