Huge lucee folder in windows 2012


#1

hi all, we migrated from railo on win 2008R2 to lucee on win 2012 and one day suddenly I got no more disc pace error, my wwwroot folder where all the sites and apps are stored is only about 2GB and then we noticed when looking at lucee folder properties that lucee folder is a whopping 31GB on disc ? What on earth is causing that ? Can that be reduced ?
Any ideas please ?
Thanks


#2

please always state the version number when reporting problems

my bet is it’s a log file, as you have access to the server, you can do a simple search
via windows explorer to see which files are taking up space


#3

thanks for your quick response

Version 	Lucee 5.2.1.9
Windows Server 2012R2 Datacenter

Yes you are right, C:\lucee\tomcat\logs there are 2 files that are huge:

lucee-stderr.2017-06-20.log 15GB
lucee-stderr.2017-07-14.log 17GB

Can I simply delete these files ?
And why are they getting so big do you think ?
Thanks again


#4

You may have to stop your Lucee / Tomcat service to do so. However deleting log files is not an issue.

You can first try to delete them by command line

del *.log C:\lucee\tomcat\logs

#5

as they are error logs, just have a look at what is being thrown (i.e. logged)

it’s all the stack traces which make them really verbose (and large)


#6

I’m guessing you might be seeing a lot of 404s with stacktraces?

Lucee currently logs the whole stack trace which is totally unnecessary for 404 requests

404 lucee-stderr log entries don’t need a verbose stacktrace
https://luceeserver.atlassian.net/browse/LDEV-1436


#7

hello there, I’d like to comment on this thread again. For quite sometime there were no issues but then suddenly these log files became again about 50GB the latest one I just deleted and it grows very very quickly I mean within one hour or so as I deleted it and an hour later it was about 50GB.
How can I stop lucee or tomcat writing these files altogether please ?
In lucee admin if I go to settings > logging all the log files are set to either INFO or ERROR but these files are kept in a different location ie website/web-inf-logs/ whereas the huge files are in C:\lucee\tomcat\logs.
I couldn’t open the files as its too large or being written to, it’s on a production server so can’t really stop the services well I could overnight maybe.
Any help would be greatly appreciated.


#8

what version of lucee are you running? please always state the version when asking for help


#9

thanks you it was at the top of this thread but here it is again:

Version Lucee 5.2.1.9
Windows Server 2012R2 Datacenter

#10

You can just delete these files but they are massive as your application is throwing out errors at a very quick rate (and they are probably stack traces so that doesn’t help)

The ones with the dates are old log files, so you can delete them without stopping Tomcat I am pretty sure.

I would really try and find out what these errors are. Not sure on windows but on other systems you could tail those files to see what are in them or get a text editor that doesn’t load the whole file into memory. There should be a number of log viewers out there to help you with this


#11

thank you, the problem is when the file size goes up to like 50GB we run out of disc space and then apps cannot write any files. I shall try and open them with some log viewer and see what the errors are, how is it possible to stop writing these completely ?


#12

http://www.log-expert.de


#13

there have been some improvements since the rather old release you are running, hence why i asked about the version in use, as 5.2.7 is the latest release, why not try that out?


#14

Consider switching to log4j. It’s a bit more flexible than the default logger and does cool stuff like log rotation.

Docs are here:


#15

hi guys, I truly need some sort of help with this issue, I’m getting a 61GB error log file almost randomly. I just simply want to stop tomcat/lucee to write anything to lucee/tomcat/logs folder. How can I do that ?
I have commented out the valve to do with logging in tomcat/conf/server.xml and also renamed the logging.properties file and it’s still keeps writing and it drives me insane. Hi can I just stop writing completely ?
Have upgraded to latest Lucee and JDBC driver.
@Jordan_Michaels thanks for the log4j recommendations but I’m ‘scared’ of adding something and not being able to configure it then mess it all up.
Could anyone help me instal and configure this log4j please ? I’m willing to pay for your time.
thanks


#16

Do you have a setenv.bat overriding?
Have you looked in the log file to see what it is outputting like asked above?


#17

the core cause of this problem of enormous log files is full java stack traces (i.e. sometimes 10k of stack traces per error) being logged out for a range of known, handled errors,

here are a couple of examples I have file bugs about, I’m sure there are lot of others

404 lucee-stderr log entries don’t need a verbose stacktrace (still marked as rejected)
https://luceeserver.atlassian.net/browse/LDEV-1436

java stacktrace error message for lucee.runtime.exp.TemplateException is missing template path
https://luceeserver.atlassian.net/browse/LDEV-1783

generally speaking, most of these stack traces are identical as they errors are being caught and handled via a known code path. and regardless of the exception, the last half to a third of nearly every stack trace logged out by lucee is identical

@akos can you provide a quick summary of the nature of errors in your 61GB of log files?


#18

@akos Rasia can do that for you if you don’t want to do it yourself. I’d recommend at least giving it a try though. Besides just fixing whatever errors you’re getting in your logs, switching to log4j WILL fix this problem for you if it’s properly configured. Maybe just try installing log4j in a local test instance before you try it in production. You’ll see how easy it is and it would help make installing it in production a lot less daunting.

Hope this helps.

Kind regards,
Jordan Michaels