How do I reset my error_log file to reduce the file size

Due to an error in the system my error_log file size went up to 51GB. I have resolved the issue. How do I delete the error_log file to reduce the size? Is there way to delete and rebuild?


What error log?

If for SuiteCRM go to Admin->System Settings and modify fields “Maximum log size” and “Maximum number of logs (before rolling)”



Thanks for your reply.
This if the file in the server’s parent directory where the suitecrm files are. The file name is called “error_log”

Quick reset of this file would be from the command line:

echo “” > error_log

However, this overwrites all of the error messages in the file! The fact that the error_log file has got that big indicates to me that there may be an underlying issue that needs rectifying? :thinking:

Also make sure that it never gets that big again by carrying out the comments above relating to configuration of the file.

I think you should “google” for specifics on error_log file management. Here for example:



Please DO NOT use that link - It is waaaaay out of date, and I really hope that you aren’t using Apache 2.2!

However as an approach, the use of logrotated (the latest iteration of that technology) is a robust way of managing this type of problem.