access.log and error.log can crash server

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Locked
DMahalko
New Member
New Member
Posts: 8
Joined: Tue May 26, 2009 7:21 am

access.log and error.log can crash server

Post 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.
User avatar
Rolf
Dev Team Member
Dev Team Member
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: access.log and error.log can crash server

Post 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
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: access.log and error.log can crash server

Post 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'.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
DMahalko
New Member
New Member
Posts: 8
Joined: Tue May 26, 2009 7:21 am

Re: access.log and error.log can crash server

Post 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?
Wishbone
Power Poster
Power Poster
Posts: 1369
Joined: Tue Dec 23, 2008 8:39 pm

Re: access.log and error.log can crash server

Post 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?
DMahalko
New Member
New Member
Posts: 8
Joined: Tue May 26, 2009 7:21 am

Re: access.log and error.log can crash server

Post 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.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: access.log and error.log can crash server

Post by calguy1000 »

Thread closed... not related to CMSMS.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Locked

Return to “The Lounge”