Difference between revisions of "SUNScholar/Troubleshooting"

From Libopedia
Jump to navigation Jump to search
m
m
Line 3: Line 3:
 
</center>
 
</center>
 
__TOC__
 
__TOC__
 
===Restart DSpace===
 
Sometimes DSpace does not behave and will "hang" and not respond. The causes for this are varied however you can setup an automatic job to restart DSpace for you if you want. See details below.
 
 
#Log in to your server and become the '''root''' user.
 
#Create a '''scripts''' folder in the '''/root''' folder.
 
#Add the following as the '''restart-dspace''' script.
 
<pre>
 
#!/bin/bash
 
/etc/init.d/tomcat6 stop
 
sleep 5
 
/etc/init.d/tomcat6 stop
 
sleep 5
 
echo "Restarting PostgreSQL"
 
service postgresql restart
 
echo "Cleaning out old xmlui cache files"
 
rm /var/lib/tomcat6/work/Catalina/localhost/_/cache-dir/cocoon-ehcache.data
 
rm /var/lib/tomcat6/work/Catalina/localhost/_/cache-dir/cocoon-ehcache.index
 
echo "Remove old catalina log file"
 
rm /var/log/tomcat6/catalina.out
 
/etc/init.d/tomcat6 restart
 
echo "Restart complete: `date`" > /var/tmp/restart-dspace
 
</pre>
 
 
Now add a '''root''' user cron job. See below.
 
45 7 * * *    /root/scripts/restart-dspace
 
This will restart DSpace 07:45 in the morning each day.
 
  
 
===Logs Debug Mode===
 
===Logs Debug Mode===
Line 55: Line 28:
 
===PostgreSQL "Idle in Transaction"===
 
===PostgreSQL "Idle in Transaction"===
 
*https://wiki.duraspace.org/display/DSPACE/Idle+In+Transaction+Problem
 
*https://wiki.duraspace.org/display/DSPACE/Idle+In+Transaction+Problem
 +
 +
 +
===[[SUNScholar/Restart_DSpace|Restart DSpace]]===
  
 
===References===
 
===References===

Revision as of 18:55, 8 November 2014

Back to Optimisations

Logs Debug Mode

Turning on Debugging (optional) If you'd like to try and do some debugging yourself, you can change the DSpace logger settings to DEBUG which will sometimes provide you with more information about the error.

  1. To turn on debugging, visit the /home/dspace/config/log4j.properties file and modify log levels as needed. You'll need to restart Tomcat after enabling DEBUG mode in the log4j.properties file.
  2. To enable DEBUG logging in the /home/dspace/log/dspace.log file, change the log4j.rootCategory and log4j.logger.org.dspace settings to DEBUG rather than INFO.
  3. (XMLUI Only) To enable DEBUG logging in the /home/dspace/log/cocoon.log file, change the log4j.logger.org.apache.cocoon setting to DEBUG rather than INFO.
  4. With DSpace versions =>4.X, log levels can now be set in the /home/dspace/source/build.properties file. To change log levels, edit the /home/dspace/source/build.properties file and then rebuild DSpace.
Sample "build.properties" config settings for log level.
#####################
# LOGLEVEL SETTINGS #
#####################
loglevel.other = DEBUG
# loglevel.other: Log level for other third-party tools/APIs used by DSpace
# Possible values (from most to least info): DEBUG, INFO, WARN, ERROR, FATAL
loglevel.dspace = DEBUG
# loglevel.dspace: Log level for all DSpace-specific code (org.dspace.*)
# Possible values (from most to least info): DEBUG, INFO, WARN, ERROR, FATAL

WARNING: Make sure to turn off debugging once you are finished. Leaving debugging turned on will cause the log files to grow very large very quickly!

PostgreSQL "Idle in Transaction"


Restart DSpace

References