cancel
Showing results for 
Search instead for 
Did you mean: 

Very big log file

djarty
Star Contributor
Star Contributor

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 12

cesarista
World-Class Innovator
World-Class Innovator

djarty
Star Contributor
Star Contributor

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
World-Class Innovator
World-Class Innovator

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
Star Contributor
Star Contributor

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
Star Contributor
Star Contributor

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.

n-schwalbe
Champ in-the-making
Champ in-the-making

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?

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

No, I have not. But I thought more of a solution that not just disable or clean the logs but solves the actual problem of the repeated requests from the search service.

But if there is no other solution than I will clean the logs periodically.

Those repeated requests from Search Service are happening by design.

Search Service is invoking the Repository periodically to perform indexing operations.

By default, that happens every 5 seconds:

https://docs.alfresco.com/search-services/latest/config/properties/#solr-index-properties

Hyland Developer Evangelist