Very big log file

cancel
Showing results for 
Search instead for 
Did you mean: 
djarty
Active Member II

Very big log file

Hello!

Got the very big log files in tomcat/logs/

Inside Something like: 

.............

127.0.0.1 - - [13/Apr/2018:00:00:19 +0300] "GET /alfresco/service/api/solr/transactions?fromCommitTime=1522634233889&toCommitTime=1522637833889&maxResults=2000&baseUrl=%2Fsolr4%2F
archive&hostName=Alf&template=&instance=0&numberOfShards=1&port=8080&stores=archive%3A%2F%2FSpacesStore&isMaster=true&hasContent=true&shardMethod=MOD_ACL_ID&lastUpdated=1523566815
085&lastIndexedChangeSetCommitTime=1520949052219&lastIndexedChangeSetId=15&lastIndexedTxCommitTime=1521097033889&lastIndexedTxId=83 HTTP/1.1" 200 115
127.0.0.1 - - [13/Apr/2018:00:00:19 +0300] "GET /alfresco/service/api/solr/transactions?fromCommitTime=1522637833889&toCommitTime=1522641433889&maxResults=2000&baseUrl=%2Fsolr4%2F
archive&hostName=Alf&template=&instance=0&numberOfShards=1&port=8080&stores=archive%3A%2F%2FSpacesStore&isMaster=true&hasContent=true&shardMethod=MOD_ACL_ID&lastUpdated=1523566815
085&lastIndexedChangeSetCommitTime=1520949052219&lastIndexedChangeSetId=15&lastIndexedTxCommitTime=1521097033889&lastIndexedTxId=83 HTTP/1.1" 200 115

.................

Again and again so logs folder summary rise to 50+ Gb..

What is this and how to fix it?

12 Replies
cesarista
Customer
djarty
Active Member II

Re: Very big log file

Hi! Its looks like fight with log size but not with source of problem Smiley Happy

I figure out something about solrcore.properties  and

alfresco.cron=0/15 * * * * ? *

inside ... may be need to make more than 15 sec.

But i think better way suppress exactly this solr log messg about datascan.. 

So how to unlog this mess but continue to log another one?

cesarista
Customer

Re: Very big log file

Hi:

You may increase SOLR cronjob, but this would imply that your document indexes are not complete or consistent during  at least this time (15s). This cronjob is run for indexing (asyncronously) last transactions created in Alfresco.

Regards.

--C.

djarty
Active Member II

Re: Very big log file

So how to suppress exactly this "GET /alfresco/service/api/solr/transactions?... log strings (in localhost_access_log...txt)    

Also anyway - some problem exists.

In one second - ~50 requests  and another 50 next second step by step.  so this request don't run every 15 sec.. its run all the time after start alfresco (even dont login and do nothing)

djarty
Active Member II

Re: Very big log file

Looking for localhost_access_log...txt  

And see 

From start using alfresco it was 10-20 requests every 15 sec

Now its more than 100-200 requests and looks like its not enough time to get answer or something and must to start next requests

Think (may be wrong) something related with   "POST /alfresco/service/api/solr/modelsdiff HTTP/1.1" 200 37  

 

Also looking on CPU load .. every 15 sec like a pulsar - maximum CPU load.. 

 

If not possible to decrease GET requests count.. I hope possible not write all of them into log file and dont make iotop ...

P.S. now just use Cesar recommendation and turn off local access log via server.xml 

But many Get requests and CPU load in this time looking not good, need tune.

oscareubieda
Member II

Re: Very big log file

Greetings, I am currently having the same problem. I noticed when I saw that the hard disk of the server was full, when I checked I noticed that it had files logs with a weight of more than 2GB.

I have not found a solution to my problem yet.

cesarista
Customer

Re: Very big log file

Check the above link Oscar.

Probably you need to purge some logs under tomcat/logs or deactivate localhost-access logs in tomcat configuration.

Regards.

--C.

n-schwalbe
Customer

Re: Very big log file

Hello,

 

it is 2022 and I still run in this issue with Alfresco 7.1.1 and Search Service 2.0.2

localhost_access.log is growing and growing. It seems Search Service repeatedly asks Alfresco for the same transactions.

 

Does anyone found a solution?

angelborroy
Alfresco Employee

Re: Very big log file

I guess that @cesarista included the right link to change that default configuration:

https://www.zylk.net/en/web-2-0/blog/-/blogs/simple-tips-about-alfresco-logs

4. Disable Tomcat localhost logs (localhost_access_log*)

Sometimes it is desired to disable localhost_access_log* logs. For this, you should comment the valve part in server.xml config

$ vim $ALF_HOME/tomcat/conf/server.xml

<!--
        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
               prefix="localhost_access_log" suffix=".txt"
               pattern="%h %l %u %t &quot;%r&quot; %s %b" />
-->


(and restart Alfresco Service)

Did you try this approach?

Hyland Developer Evangelist