I'm new to Liferay developing and I’m facing troubles with the startup of my Liferay Tomcat server. It takes almost 3 minutes (169048 ms) which is unacceptable for development. I’d like to get it down to about one minute.
Here are the specs of my machine:
I’m using:
In order to speed things up, I’ve:
#disable some filters com.liferay.portal.servlet.filters.sso.cas.CASFilter = false com.liferay.portal.servlet.filters.sso.ntlm.NtlmFilter = false com.liferay.portal.servlet.filters.sso.ntlm.NtlmPostFilter = false com.liferay.portal.servlet.filters.sso.opensso.OpenSSOFilter= false com.liferay.portal.sharepoint.SharepointFilter = false com.liferay.portal.servlet.filters.gzip.GZipFilter = false #disable indexing index.on.startup=false
Here’s my startup log:
Jan 30, 2013 8:39:49 AM org.apache.catalina.core.AprLifecycleListener init INFO: Loaded APR based Apache Tomcat Native library 1.1.24. Jan 30, 2013 8:39:49 AM org.apache.catalina.core.AprLifecycleListener init INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true]. Jan 30, 2013 8:39:51 AM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler ["http-apr-8080"] Jan 30, 2013 8:39:51 AM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler ["ajp-apr-8009"] Jan 30, 2013 8:39:51 AM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 2620 ms Jan 30, 2013 8:39:51 AM org.apache.catalina.core.StandardService startInternal INFO: Starting service Catalina Jan 30, 2013 8:39:51 AM org.apache.catalina.core.StandardEngine startInternal INFO: Starting Servlet Engine: Apache Tomcat/7.0.27 Jan 30, 2013 8:39:51 AM org.apache.catalina.startup.HostConfig deployDescriptor INFO: Deploying configuration descriptor C:\Liferay\portal-6.1.1-ce-ga2\tomcat-7.0.27\conf\Catalina\localhost\Hi-portlet.xml Jan 30, 2013 8:39:51 AM org.apache.catalina.startup.HostConfig deployDescriptor WARNING: A docBase C:\Liferay\portal-6.1.1-ce-ga2\tomcat-7.0.27\webapps\Hi-portlet inside the host appBase has been specified, and will be ignored Jan 30, 2013 8:39:51 AM org.apache.catalina.startup.SetContextPropertiesRule begin WARNING: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:Hi-portlet' did not find a matching property. Jan 30, 2013 8:39:52 AM org.apache.catalina.startup.HostConfig deployDescriptor INFO: Deploying configuration descriptor C:\Liferay\portal-6.1.1-ce-ga2\tomcat-7.0.27\conf\Catalina\localhost\ROOT.xml Loading jar:file:/C:/Liferay/portal-6.1.1-ce-ga2/tomcat-7.0.27/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties Loading jar:file:/C:/Liferay/portal-6.1.1-ce-ga2/tomcat-7.0.27/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties Loading file:/C:/Liferay/portal-6.1.1-ce-ga2/portal-ide.properties Loading file:/C:/Liferay/portal-6.1.1-ce-ga2/tomcat-7.0.27/webapps/ROOT/WEB-INF/classes/portal-developer.properties Loading file:/C:/Liferay/portal-6.1.1-ce-ga2/portal-ext.properties Jan 30, 2013 8:39:59 AM org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring root WebApplicationContext 08:40:16,321 INFO [pool-2-thread-1][DialectDetector:71] Determine dialect for HSQL Database Engine 2 08:40:16,330 WARN [pool-2-thread-1][DialectDetector:86] Liferay is configured to use Hypersonic as its database. Do NOT use Hypersonic in production. Hypersonic is an embedded database useful for development and demo'ing purposes. The database settings can be changed in portal-ext.properties. 08:40:16,484 INFO [pool-2-thread-1][DialectDetector:136] Found dialect org.hibernate.dialect.HSQLDialect Starting Liferay Portal Community Edition 6.1.1 CE GA2 (Paton / Build 6101 / July 31, 2012) 08:41:36,974 INFO [pool-2-thread-1][BaseDB:452] Database supports case sensitive queries 08:41:37,828 INFO [pool-2-thread-1][ServerDetector:154] Server supports hot deploy 08:41:37,850 INFO [pool-2-thread-1][PluginPackageUtil:1030] Reading plugin package for the root context 08:42:19,657 INFO [pool-2-thread-1][AutoDeployDir:106] Auto deploy scanner started for C:\Liferay\portal-6.1.1-ce-ga2\deploy 08:42:24,410 INFO [pool-2-thread-1][HotDeployImpl:178] Deploying Hi-portlet from queue 08:42:24,415 INFO [pool-2-thread-1][PluginPackageUtil:1033] Reading plugin package for Hi-portlet Jan 30, 2013 8:42:24 AM org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring root WebApplicationContext Jan 30, 2013 8:42:30 AM org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring FrameworkServlet 'Remoting Servlet' Jan 30, 2013 8:42:34 AM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory C:\Liferay\portal-6.1.1-ce-ga2\tomcat-7.0.27\webapps\resources-importer-web 08:42:35,522 INFO [pool-2-thread-1][HotDeployImpl:178] Deploying resources-importer-web from queue 08:42:35,523 INFO [pool-2-thread-1][PluginPackageUtil:1033] Reading plugin package for resources-importer-web Jan 30, 2013 8:42:36 AM org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring root WebApplicationContext Jan 30, 2013 8:42:36 AM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory C:\Liferay\portal-6.1.1-ce-ga2\tomcat-7.0.27\webapps\welcome-theme 08:42:36,609 INFO [pool-2-thread-1][HotDeployEvent:109] Plugin welcome-theme requires resources-importer-web 08:42:37,305 INFO [pool-2-thread-1][HotDeployImpl:178] Deploying welcome-theme from queue 08:42:37,306 INFO [pool-2-thread-1][PluginPackageUtil:1033] Reading plugin package for welcome-theme Jan 30, 2013 8:42:37 AM org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring root WebApplicationContext 08:42:37,787 INFO [pool-2-thread-1][ThemeHotDeployListener:87] Registering themes for welcome-theme 08:42:39,764 INFO [pool-2-thread-1][ThemeHotDeployListener:100] 1 theme for welcome-theme is available for use Jan 30, 2013 8:42:40 AM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["http-apr-8080"] 08:42:40,167 INFO [liferay/hot_deploy-1][HotDeployMessageListener:142] Group or layout set prototype already exists for company liferay.com Jan 30, 2013 8:42:40 AM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["ajp-apr-8009"] Jan 30, 2013 8:42:40 AM org.apache.catalina.startup.Catalina start INFO: Server startup in 169048 ms
Any suggestions?
The comments already gave some hints. I'd say, the most important issue is to check if virtual memory (paging) is used - as soon as the OS has to page memory to disk, you have lost: There's a potentially huge performance hit.
When you upgrade your memory (e.g. if you hit the virtual memory) you might want to consider upgrading the OS to a 64bit OS - 32bit can only address 4G and you might hit limits with appserver memory as each process can only get a limited amount of memory.
You could also test if Liferay starts up faster before you run so many other applications - this is another hint that you're running into a memory issue.
The SSD option will further accelerate your system, but for a much higher price than RAM. Also, virtual memory on SSD is not really recommended - it will wear out the drive quicker. And instead of using virtual memory on SSD, rather don't use virtual memory - this will be quicker AND cheaper.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With