Page 1 of 1
access.log and error.log can crash server
Posted: Tue Mar 20, 2012 5:49 pm
by DMahalko
If you're running CMSMS on linux in a virtual machine using the default install, then you're probably using a "small" virtual disk such as 8 gigabytes.
Please note that there are two cmsms log files that can grow to hugomongous proportions over several years, consume all available disk space, and hang or crash your webserver.
CMSMS database corruption is also possible if the SQL server runs out of disk space and crashes.
These log files are located in:
- /var/log/cmsms/access.log
- /var/log/cmsms/error.log
You can try to remember to periodically delete them, but they are recreated and updated anytime someone accesses your website.
Or you can also have linux automatically manage the log files for you.
With Ubuntu, to control the growth of these two files, log on as root and create the following text file:
/etc/logrotate.d/cmsms
Paste into it the following:
/var/log/cmsms/access.log /var/log/cmsms/error.log {
daily
rotate 30
compress
missingok
notifempty
}
This keeps 30 days worth of logging information, and compresses each previous day's log file. After 30 days the old logs are deleted.
This method may also work with other flavors of linux.
Re: access.log and error.log can crash server
Posted: Tue Mar 20, 2012 6:36 pm
by Rolf
DMahalko wrote:Please note that there are
two cmsms log files that can grow to hugomongous proportions over several years, consume all available disk space, and hang or crash your webserver.
...
These log files are located in:
- /var/log/cmsms/access.log
- /var/log/cmsms/error.log
...
These are not CMS Made Simple files, but are owned/used by your server software...
grtz. Rolf
Re: access.log and error.log can crash server
Posted: Tue Mar 20, 2012 10:24 pm
by calguy1000
Your post is just plain inaccurate... if not completely wrong.
None of the 10 or so VPS's I work on, or 30 or 40 I have worked on in the last year are configured in this way. The log files are named differently, the apache configuration files are named differently, and there are a few that use different log file rotation software (admittedly, some of these are running older versions of linux). And the log rotation software used configuration files in different locations.
Though it is not our job to teach you how linux or webservers work, I will state a few things for clarity:
The files you named are not CMSMS files they are generated by your webserver (and there are numerous webserver packages, not just apache). A configuration file (or files) on the web server state where access and error logs go, and can be different for each virtual host, or even subdirectory that an http server is serving from. There are other conditions that can generate different log files too.
The location of these logfiles is usually defined by default by the flavor of linux and/or http server you are running... but can be customized by any authorized administrator.
Most recent LAMP packages automatically have log rotation built in to handle the default configuration.
i: The software used for log rotation can change depending on the flavor of linux.
ii: The location and syntax of the config files for the log rotation can change depending upon the linux flavor and then changed by authorized administrators.
Modifying config files on a server (or VM or VPS) requires intimate knowledge of the system. In unix/linux there are no absolutes such as this as everything is configurable and/or system dependant. There are also still numerous flavors of unix, and many versions of those flavors.
Please before you try to post 'absolutes' like you did in your post... know what you're talking about. Other inexperienced admins will come here and read that stuff via a google search and may totally mess their VPS up because they don't know any better.
As stated in the readme first forum you are expected to post well researched, well explained posts, and to post in the correct location.
- Post moved to 'The Lounge'.
Re: access.log and error.log can crash server
Posted: Wed Mar 21, 2012 12:57 am
by DMahalko
I apologize for not using six different distributions of linux before posting. God forbid there be consistency across operating systems, or any ability of the CMSMS installer to detect such logging variations and deal with them automatically.
What's that "made simple" bit supposed to mean, anyway? Made simple except for a few gotchas we didn't mention and may inadvertently screw up your server years later because, naughty you, you didn't already know about it beforehand?
Re: access.log and error.log can crash server
Posted: Wed Mar 21, 2012 1:00 am
by Wishbone
DMahalko wrote:...or any ability of the CMSMS installer to detect such logging variations and deal with them automatically.
What's that "made simple" bit supposed to mean, anyway? Made simple except for a few gotchas we didn't mention and may inadvertently screw up your server years later because, naughty you, you didn't already know about it beforehand?
Which part of this has to do with CMSMS?
Do other CMS's have a mechanism to deal with this?
Re: access.log and error.log can crash server
Posted: Wed Mar 21, 2012 1:11 am
by DMahalko
Also I see there is a need to set up some sort of disk space monitor in general, so that single-purpose CMSMS linux servers that run unattended for long periods of time without any problems with automatic data backup, will at least send email alerts if the disk is getting 90+% full.
Re: access.log and error.log can crash server
Posted: Wed Mar 21, 2012 1:38 am
by calguy1000
Thread closed... not related to CMSMS.