Difference between revisions of "SUNScholar/Optimisations/Logs"
(→SOLR) |
|||
| Line 27: | Line 27: | ||
''Also see: http://skybert.wordpress.com/2009/07/22/how-to-get-solr-to-log-to-a-log-file'' | ''Also see: http://skybert.wordpress.com/2009/07/22/how-to-get-solr-to-log-to-a-log-file'' | ||
| − | See news from @atmire below. | + | ;See news from @atmire below. |
| − | + | ---- | |
Limiting log output for SOLR | Limiting log output for SOLR | ||
| Line 34: | Line 34: | ||
Add the following instruction in this empty file: | Add the following instruction in this empty file: | ||
| − | org.apache.solr.level = WARNING | + | org.apache.solr.level = WARNING |
| − | + | ---- | |
| + | |||
===Log file permissions=== | ===Log file permissions=== | ||
I setup a root cron crontab as follows. | I setup a root cron crontab as follows. | ||
Revision as of 14:22, 29 July 2013
Tomcat Java web applications
Changed all instances of "INFO" to "ERROR" in the following config file to reduce disk I/O and CPU load.
nano /home/dspace/config/log4j.properties
Then copied the file to dspace-src config folder.
SOLR
Log level
Please note: The procedure below is not stable, so I installed PSI Probe using the Tomcat manager web interface and now I set the SOLR log level via the web gui after each re-build. See: https://code.google.com/p/psi-probe
See: http://lucidworks.lucidimagination.com/display/solr/Configuring+Logging and https://jira.duraspace.org/browse/DS-1460
Create the following file:
nano /home/dspace/dspace-1.8.2-src-release/dspace/modules/solr/src/main/webapp/WEB-INF/classes/logging.properties
Add the following to the file:
org.apache.commons.digester.Digester.level = WARNING org.apache.solr.level = SEVERE
- NANO Editor Help
| CTL+O | = Save the file and then press Enter |
| CTL+X | = Exit "nano" |
| CTL+K | = Delete line |
| CTL+U | = Undelete line |
| CTL+W | = Search for %%string%% |
| CTL+\ | = Search for %%string%% and replace with $$string$$ |
| CTL+C | = Show line numbers |
More info = http://en.wikipedia.org/wiki/Nano_(text_editor)
Save the file and rebuild.
Also see: http://skybert.wordpress.com/2009/07/22/how-to-get-solr-to-log-to-a-log-file
- See news from @atmire below.
Limiting log output for SOLR
Adding SOLR logging propertiesWe extensively covered the growth of log files and the different log levels in last month's article. In addition to the dspace logfiles contained in /dspace/log, some DSpace components write directly into the logfiles of your application container, Tomcat. One culprit in particular is SOLR. SOLR is the key component responsible for statistics, Discovery and most recently, OAI-PMH. The default logging level for SOLR is INFO, meaning that it will write to the Tomcat catalina.out logfile for each request it receives. To override this behavior add a file named logging.properties to the solr module found in $dspace.src$/dspace/modules/solr/src/main/resources.
Add the following instruction in this empty file:
org.apache.solr.level = WARNING
Log file permissions
I setup a root cron crontab as follows.
sudo -i
crontab -e
Add the following line.
@midnight chmod 0777 -R /home/dspace/log
Save the crontab edit.
- NANO Editor Help
| CTL+O | = Save the file and then press Enter |
| CTL+X | = Exit "nano" |
| CTL+K | = Delete line |
| CTL+U | = Undelete line |
| CTL+W | = Search for %%string%% |
| CTL+\ | = Search for %%string%% and replace with $$string$$ |
| CTL+C | = Show line numbers |
More info = http://en.wikipedia.org/wiki/Nano_(text_editor)
See: http://wiki.lib.sun.ac.za/index.php/SUNScholar/Install_Dspace/S06#Step_6.3:_Setup_Tomcat_server_permissions for reference about file permissions.
Back to Optimisations