Dspace-cris tomcat Restart for too long time

478 views
Skip to first unread message

陳彥棠

unread,
Nov 9, 2016, 8:41:54 PM11/9/16
to DSpace Technical Support
Dear all

I am sorry that my English is not good

I run dspace-cris restart tomcat long time.....

I set up memory parameters for tomcat

tomcat => catalina.sh

add   JAVA_OPTS="-Dfile.encoding=UTF-8 -server -Xms1024m -Xmx2048m -XX:PermSize=512m -XX:MaxPermSize=1024m" 

restart tomcat => catalina.log

org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.


Waiting for a long time.....

If I do not set the memory
parameters for the tomcat  that dspace-cris  failed to start...

Tomcat the same memory settings  that I run dspace 5.5 is no problem.....
but run dspace-cris is
long time .......

Environment settings
centos7
tomcat 8.0.38
postgreSQL 9.5
java  1.8
ant 1.9.7
maven 3.3.9



How do I set tomcat memory parameters?

(File reference)

Regards
catalina.2016-11-10.log
tomcat.service
catalina.sh

Bollini Andrea

unread,
Nov 12, 2016, 4:15:04 PM11/12/16
to 陳彥棠, DSpace Technical Support

Hi,

if I understand correctly you are able to successful run DSpace-CRIS but it takes (relatively) to much time to startup.

Try to set a lower minimum of memory allocation, this could speed up the startup process a bit

JAVA_OPTS="-Dfile.encoding=UTF-8 -server -Xms512m -Xmx2048m -XX:PermSize=256m -XX:MaxPermSize=1024m" 

if you are using java8 the permgen settings, in bold in the previous setting, are not relevant as they are not longer used.

Another things that you can do, and by direct experience I can say that this save lot of time, is to add almost all the jars name that are inside the webapps/jspui/WEB-INF/lib folder at the end of the tomcat.util.scan.StandardJarScanFilter.jarsToSkip  property in the catalina.properties file.
The only jar names that you MUST NOT include in this list are the one named jdyna*.jar

Please let us know if it help if so, share your new configuration so that I can put a note in the dspace-cris documentation about this improvements.
Andrea
--
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
To post to this group, send email to dspac...@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.

-- 
Andrea Bollini
Chief Technology and Innovation Officer

4Science,  www.4science.it
office: Via Edoardo D'Onofrio 304, 00155 Roma, Italy
mobile: +39 333 934 1808
skype: a.bollini
linkedin: andreabollini
orcid: 0000-0002-9029-1854

an Itway Group Company
Italy, France, Spain, Portugal, Greece, Turkey, Lebanon, Qatar, U.A.Emirates

陳彥棠

unread,
Nov 30, 2016, 9:44:20 PM11/30/16
to DSpace Technical Support, exia...@gmail.com, Andrea....@4science.it
Dear Bollini Andrea

Installation environment
      Centos 7 (vmware memory 12 GB)
      jdk1.8.0_101
      postgresSQL 9.5
      tomcat 8.0.37  ('JAVA_OPTS=-Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom -Dfile.encoding=UTF-8 -server -Xms512m -Xmx2048m')
      dspace-cris-5.6.1
     
     
I follow the method you provided
"add almost all the jars name that are inside the webapps/jspui/WEB-INF/lib folder at the end of the tomcat.util.scan.StandardJarScanFilter.jarsToSkip property in the catalina.properties file."

The total time to restart tomcat is 10 minutes that dspace-cris started.
This is my starting time for using the Dspace-CRIS-5.6.1

Always restart tomcat time is 10 minutes.

But I only use Dspace-CRIS-5.5.0 encounter this problem

org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.


After I use Dspace-CRIS-5.6.1 did not encounter this problem!
I don't add almost all the jars name that are inside the webapps/jspui/WEB-INF/lib folder at the end of the tomcat.util.scan.StandardJarScanFilter.jarsToSkip  property in the catalina.properties file.
restart tomcat time is 10 minutes.

I add almost all the jars name that are inside the webapps/jspui/WEB-INF/lib folder at the end of the tomcat.util.scan.StandardJarScanFilter.jarsToSkip  property in the catalina.properties file.
restart tomcat time is same 10 minutes......




this is localhost.logs message
01-Dec-2016 09:52:22.532 資訊 [localhost-startStop-2] org.apache.catalina.core.ApplicationContext.log Closing Spring root WebApplicationContext
01-Dec-2016 09:52:26.263 資訊 [localhost-startStop-2] org.apache.catalina.core.ApplicationContext.log Destroying Spring FrameworkServlet 'springmvc-rp'
01-Dec-2016 09:52:26.322 資訊 [localhost-startStop-2] org.apache.catalina.core.ApplicationContext.log Closing Spring root WebApplicationContext
01-Dec-2016 09:52:26.381 資訊 [localhost-startStop-2] org.apache.catalina.core.ApplicationContext.log SessionListener: contextDestroyed()
01-Dec-2016 09:52:26.382 資訊 [localhost-startStop-2] org.apache.catalina.core.ApplicationContext.log ContextListener: contextDestroyed()
01-Dec-2016 09:52:26.649 資訊 [localhost-startStop-2] org.apache.catalina.core.ApplicationContext.log Destroying Spring FrameworkServlet 'spring'
01-Dec-2016 09:52:26.708 資訊 [localhost-startStop-2] org.apache.catalina.core.ApplicationContext.log Closing Spring root WebApplicationContext
01-Dec-2016 09:52:35.824 資訊 [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
01-Dec-2016 09:52:35.824 資訊 [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()
01-Dec-2016 09:52:43.236 資訊 [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log No Spring WebApplicationInitializer types detected on classpath
01-Dec-2016 09:53:13.159 資訊 [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log Initializing Spring root WebApplicationContext
01-Dec-2016 09:53:13.488 資訊 [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log Initializing Spring FrameworkServlet 'springmvc-rp'
01-Dec-2016 09:53:23.614 資訊 [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log No Spring WebApplicationInitializer types detected on classpath
01-Dec-2016 09:53:52.723 資訊 [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log No Spring WebApplicationInitializer types detected on classpath
01-Dec-2016 09:54:27.410 資訊 [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log No Spring WebApplicationInitializer types detected on classpath
01-Dec-2016 09:54:55.201 資訊 [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log Initializing Spring root WebApplicationContext
01-Dec-2016 09:55:00.205 資訊 [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log  In context /solr, configuring Log4J from file:/opt/dspace-cris/config/log4j-solr.properties
01-Dec-2016 09:55:09.960 資訊 [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log No Spring WebApplicationInitializer types detected on classpath
01-Dec-2016 09:55:56.972 資訊 [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log No Spring WebApplicationInitializer types detected on classpath
01-Dec-2016 09:56:59.816 資訊 [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log No Spring WebApplicationInitializer types detected on classpath
01-Dec-2016 09:59:33.586 資訊 [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log Initializing Spring root WebApplicationContext
01-Dec-2016 09:59:42.924 資訊 [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log Apache Cocoon Spring Configurator v1.0.2 is running in mode 'prod'.
01-Dec-2016 10:00:01.354 資訊 [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log Initializing Spring FrameworkServlet 'spring'                         
                                             
This is the result of my test .

My catalina.properties , tomcat.service


     
Regards


Sincerly yours, Yen-Tang Chen

catalina.properties
tomcat.service

Bollini Andrea

unread,
Dec 23, 2016, 11:23:05 AM12/23/16
to 陳彥棠, DSpace Technical Support

Dear Yen-Tang Chen,

how many webapps have you deployed on Tomcat? a good test could be to include in tomcat just the jspui to check the real startup time, check the startup time for each specific webapp.

My suggestion is to have solr on a separate tomcat, this will allow a more easy tuning of the system performance and save a lot of time in restarting the service as SOLR usually doesn't need to be restarted at all (you can hot-reload the configuration if needed).

Let me know.

Andrea

PS: recently I face with a project where tomcat reside on a NFS... this situation drastically drop the system performance. In such scenario the assetstore can stay on the NFS but all the other content (logs, webapps, tmp, etc.) should move to fast drive

Yen-Tang Chen

unread,
Dec 24, 2016, 9:10:05 AM12/24/16
to DSpace Technical Support, exia...@gmail.com, Andrea....@4science.it
Dear Bollini Andrea

Thank you for your advice :D

I only use 8 webapps (jspui, rdf, rest ,sword, sword v2,  oai, solr, xmlui)

I upgrade tomcat memory "JAVA_OPTS="-Dfile.encoding=UTF-8 -server -Xms512m -Xmx2048m"  to "JAVA_OPTS="-Dfile.encoding=UTF-8 -server -Xms512m -Xmx4096m"
Restart tomcat time shorten the time , restart tomcat time is 5 minutes.

I found that the memory is too small, Resulting in starting dspace-cris too much time...
After I use 4gb memory , Dspace-CRIS start faster .
This is my negligence caused by the problem(less memory )


I am grateful for your assistance. 

Sincerely yours, Yen-Tang Chen
Reply all
Reply to author
Forward
0 new messages