cancel
Showing results for 
Search instead for 
Did you mean: 

Log files taking up a ridiculous amount of space

scorpiotiger
Champ in-the-making
Champ in-the-making
After having the Alfresco server go down due to a lack of disk space, I found a load of Tomcat logs using up gigs of space. I deleted them and we were doing fine, now having had the same issue I'm finding loads of log files in the Alfresco directory. The files are named along the lines of; alfresco.log.2015-11-04, share.log.2015-09-12, solr.log.2015-10-07, webquickstart.log.2016-01-04. Some of the Alfresco logs were over 10gig in size. Given that the entire repository is less than 3, this is ridiculous. What on earth could it possibly log that takes so much space?

Why does Alfresco not clean up after itself. It would seem clear that Alfresco "out of the box" is not even close to production ready when it's ultimately going to bring the server down due to lack of disk space. How do I get Alfresco (and all it's associated components) to do it's housekeeping? I don't expect that we need more than a weeks worth of logs, and we don't need it so verbose that it takes up more space than the entire repository..!
6 REPLIES 6

afaust
Legendary Innovator
Legendary Innovator
Hello,

cleanup up log files does not fall into the responsibility of Alfresco. Log files are the responsibility of the system administrator who might have very specific requirements on how long he wants to keep them around, and also how he might want to store them long term (I know customers that maintain a full year of log files to be able to check if a new error might have occurred before).
The amount of data that is logged is typically defined by the system administrator - Alfresco only provides a default log configuration to reduce the amount of settings the administrator to a reasonable number. Depending on what the system is actually doing, some messages are filtered and some output to the log file. I have one system I currently work with which only logs aout a megabyte of status messages per day, but last week, produced 600 megabytes for two days each due to some misbehaving background process.

Depending on the operating system, there might also be the requirement of managing logs (cleanup / rotation / auto-compression) using existing tools / mechanics. E.g. in Linux environments, an administrator does not want Alfresco to do anything but output to file since the logrotate deamon typically takes care of compressing log files and keeping either a certain amount of files or for a certain duration before clearing them.

I advise reading into:
Alfresco documentation on <a href="http://docs.alfresco.com/5.0/concepts/dev-extensions-modules-module-log4j.html">log files</a> and <a href="http://docs.alfresco.com/5.0/tasks/log-levels-set.html">setting log levels</a>
Log4j 1.2 documentation (this was previously on <a href="https://logging.apache.org/log4j/1.2/">the homepage</a> but since EoL announcement I couldn't find it)
Log4j 1.2 <a href="http://www.qos.ch/shop/products/log4jManual">complete manual</a> (this is not the official manual of the project, but a very, very extended version of it)
<a href="http://www.linuxcommand.org/man_pages/logrotate8.html">logrotate manpage</a>

guithon
Champ on-the-rise
Champ on-the-rise

Hello Alex,

I have the same issue with a recent 5.1.3 installation.

I do not understand why logs files such as local_access_log<date>.txt are so big !

More than 3 Gb. each day when the system is not even in production which means that there are no users.

Thanks for your means

guithon
Champ on-the-rise
Champ on-the-rise

afaust
Legendary Innovator
Legendary Innovator

They are that big because SOLR will regularly poll for changes to index and that produces data even if no users are active. You can always disable the Tomcat access logs, e.g. if you already have a proxy in place to capture the relevant accesses. Simply remove the access log valve from the Tomcat server.xml.

guithon
Champ on-the-rise
Champ on-the-rise

Thank you Axel.

I precise that there are no data in the system yet.

cesarista
World-Class Innovator
World-Class Innovator