Forums de discussion

Liferay 6.2 startup slow normal?

thumbnail
Moisés Belda, modifié il y a 10 années.

Liferay 6.2 startup slow normal?

Junior Member Publications: 75 Date d'inscription: 20/04/13 Publications récentes
Liferay 6.2 startup in my development enviroment is very slow.

I tested some jvm configs (default, using cores, etc) and startup is very slow at this point:

INFO [localhost-startStop-1][PluginPackageUtil:1013] Reading plugin package for the root context

(About 8 minutes, 10 minutes total startup)

My development enviroment specs:
- Intel Core i7 2GHZ
- 8gb ram
- Windows 8

I see system monitor and cpu, memory and disk resources are free....

Is this speed normal at this startup point?
thumbnail
M J, modifié il y a 10 années.

RE: Liferay 6.2 startup slow normal?

Regular Member Publications: 184 Date d'inscription: 01/03/13 Publications récentes
Yes, Liferay 6.2 CE startup is way slower than Liferay 6.1 CE. My environment is Windows 7, 16GB RAM, Liferay 6.2 CE with tomcat-7.0.42.
thumbnail
Zsolt Balogh, modifié il y a 10 années.

RE: Liferay 6.2 startup slow normal?

Expert Publications: 463 Date d'inscription: 23/03/09 Publications récentes
Hi Moisés,

The server startup is 66s on my laptop with a similar config on the same version with tomcat + hsql. I use SSD, that might be a difference, though not this big.

Can you generate some thread dumps when it's stuck to see what's taking so much time?

Zsolt
Daniel Wilmes, modifié il y a 10 années.

RE: Liferay 6.2 startup slow normal?

Regular Member Publications: 164 Date d'inscription: 23/05/11 Publications récentes
We are also seeing this issue with a similar pc configuration

My development environment specs:
- Intel Core i5
- 8gb ram
- Windows 8


[2014-03-14 14:31:32,132] INFO [localhost-startStop-1] [STUFF] PluginPackageUtil:1013 Reading plugin package for the root context
[2014-03-14 14:38:06,068] INFO [localhost-startStop-1] [STUFF] AutoDeployDir:139 Auto deploy scanner started for C:\upgrade\build\dist\liferay-portal-6.2.0-ce-ga1\deploy

As you can see in the startup log it took about 6.5 minutes in between log statements.

Any ideas?

Thanks,
Dan
thumbnail
Moisés Belda, modifié il y a 10 années.

RE: Liferay 6.2 startup slow normal?

Junior Member Publications: 75 Date d'inscription: 20/04/13 Publications récentes
Zsolt Balogh:
Hi Moisés,

The server startup is 66s on my laptop with a similar config on the same version with tomcat + hsql. I use SSD, that might be a difference, though not this big.

Can you generate some thread dumps when it's stuck to see what's taking so much time?

Zsolt


Hi Zsolt...

How can I generate a thread dump during startup process?
thumbnail
André Bunse, modifié il y a 9 années.

RE: Liferay 6.2 startup slow normal?

Junior Member Publications: 65 Date d'inscription: 13/02/14 Publications récentes
You can make thread dumps all the time with ex. "jvisualvm" ($JAVA_HOME/bin)

Select Tomcat process, then menu item "Application" -> "Thread Dump"

or take a look at the register "Thread" in the "Tomcat" panel to see what's going on.
thumbnail
Moisés Belda, modifié il y a 9 années.

RE: Liferay 6.2 startup slow normal?

Junior Member Publications: 75 Date d'inscription: 20/04/13 Publications récentes
André Bunse:
You can make thread dumps all the time with ex. "jvisualvm" ($JAVA_HOME/bin)

Select Tomcat process, then menu item "Application" -> "Thread Dump"

or take a look at the register "Thread" in the "Tomcat" panel to see what's going on.



Hi André

I have done a thread dump but I don't know how can I see what is the bottle neck....Can you help me?

Here is the thread dump => Thead dump

I copied at startup step " INFO [localhost-startStop-1][PluginPackageUtil:1013] Reading plugin package for the root context"
thumbnail
ARAVINTH KUMAR, modifié il y a 10 années.

RE: Liferay 6.2 startup slow normal?

Regular Member Publications: 152 Date d'inscription: 26/06/13 Publications récentes
Yes, Liferay 6.2 CE startup is slower than previous versions.
I use Ubuntu 12.10, 8GB RAM and Liferay 6.2 CE.
thumbnail
Bart Simpson, modifié il y a 9 années.

RE: Liferay 6.2 startup slow normal?

Liferay Master Publications: 522 Date d'inscription: 29/08/11 Publications récentes
What made the difference for me is increase the virtual machine setting to -Xmx2048m -Xms2048m and additionally switch to 64 bit Java that I had installed rather then using bundled one.
thumbnail
André Bunse, modifié il y a 9 années.

RE: Liferay 6.2 startup slow normal?

Junior Member Publications: 65 Date d'inscription: 13/02/14 Publications récentes
I never used bundled java version, always latest jdk.
Thomas Kellerer, modifié il y a 9 années.

RE: Liferay 6.2 startup slow normal?

Expert Publications: 490 Date d'inscription: 09/06/08 Publications récentes
Same here:
  • Windows 7 Professional
  • Liferay 6.2.1
  • Core i7 quad-core, 16GB RAM
  • SSD Harddisk
  • Java 1.7.0_55
  • Started with -Xmx2048m
Startup time: ~3 minutes

May 14, 2014 10:53:57 AM org.apache.catalina.core.AprLifecycleListener init
May 14, 2014 10:53:58 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
May 14, 2014 10:53:58 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
May 14, 2014 10:53:58 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 931 ms
May 14, 2014 10:53:58 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
May 14, 2014 10:53:58 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.42
May 14, 2014 10:53:58 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor C:\Projects\Liferay\liferay-6.2.1\tomcat-7.0.42\conf\Catalina\localhost\ROOT.xml
Loading jar:file:/C:/Projects/Liferay/liferay-6.2.1/tomcat-7.0.42/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
Loading jar:file:/C:/Projects/Liferay/liferay-6.2.1/tomcat-7.0.42/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
Loading jar:file:/C:/Projects/Liferay/liferay-6.2.1/tomcat-7.0.42/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
Loading file:/C:/Projects/Liferay/liferay-6.2.1/portal-setup-wizard.properties
May 14, 2014 10:54:19 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
10:54:25,888 INFO  [localhost-startStop-1][DialectDetector:71] Determine dialect for PostgreSQL 9
10:54:25,953 INFO  [localhost-startStop-1][DialectDetector:136] Found dialect org.hibernate.dialect.PostgreSQLDialect
...
...
May 14, 2014 10:56:36 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 158374 ms
thumbnail
Moisés Belda, modifié il y a 9 années.

RE: Liferay 6.2 startup slow normal?

Junior Member Publications: 75 Date d'inscription: 20/04/13 Publications récentes
For my enviroment the slowest startup step is :

15:03:03,013 INFO [localhost-startStop-1][PluginPackageUtil:1013] Reading plugin package for the root context
15:11:26,749 INFO [localhost-startStop-1][AutoDeployDir:139] Auto deploy scanner started for C:\Desarrollo\liferay\liferay621-activa\liferay-portal-6.2-ce-ga2\deploy

at least 8 minutes!.. in this startup step...... with

Hardware

Intel Core i7-3537U CPU @ 2.00 GHZ 2.50 GHZ,
8 GB RAM,
not-SSD Hardisk,

Software
Win 8.1
Java 7 (64 bits) + Liferay 6.2.1
JVM arguments => -Xms1024m -Xmx2048m -XX:MaxPermSize=512m -XX:NewSize=700m -XX:MaxNewSize=700m -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:SurvivorRatio=20 -XX: ParallelGCThreads=4
thumbnail
André Bunse, modifié il y a 9 années.

RE: Liferay 6.2 startup slow normal?

Junior Member Publications: 65 Date d'inscription: 13/02/14 Publications récentes
Remember that for Liferay 6.2 you should not set JAVA_OPTS anymore, instead use CATALINA_OPTS.
(see ${TOMCAT_HOME}/bin/setenv.*)
Thomas Kellerer, modifié il y a 9 années.

RE: Liferay 6.2 startup slow normal?

Expert Publications: 490 Date d'inscription: 09/06/08 Publications récentes
André Bunse:
Remember that for Liferay 6.2 you should not set JAVA_OPTS anymore, instead use CATALINA_OPTS.
(see ${TOMCAT_HOME}/bin/setenv.*)


I have never set JAVA_OPTS, I have always done the JVM configuration through CATALINA_OPTS
thumbnail
Moisés Belda, modifié il y a 9 années.

RE: Liferay 6.2 startup slow normal?

Junior Member Publications: 75 Date d'inscription: 20/04/13 Publications récentes
Some disturbing tests....

1.- With my windows 8.1 64 bits development enviroment,,:

About 12 -15 minutes startup....Changing jvm parameters, same results...too slow. The critical step is "INFO [localhost-startStop-1][AutoDeployDir:139] Auto deploy scanner started for ...." with 5-7 minutes duration. Tested with Java 6 , Java 7 and Java 8, (32 and 64 bits versions).

2.- With the SAME windows 8 machine, but using them like virtual box host and Linux Ubuntu guest....With the same jvm parameters....

About 3 minutes (that's a normal startup time!). With ubuntu virtual machine critical step "INFO [localhost-startStop-1][AutoDeployDir:139] Auto deploy scanner started for ...." is 30 seconds! and within a virtual machine!

3.- With the SAME windows 8 machine, but using them like virtual box host and Windows 7 guest.....With the same jvm parameters...

Just only 3 minutes too! And within a virtual machine!

Definitely the problem seems to be Windows 8.1 .

Anyone works with Windows 8.1? I have discarted hardware problem with the Ubuntu virtual machine (only 3 minutes startup) and the Windows 7 virtual machine (only 3 minutes). I tested all posible java versions and parameters, and liferay startup is not normal.
thumbnail
Brian Chan, modifié il y a 9 années.

RE: Liferay 6.2 startup slow normal?

Liferay Master Publications: 753 Date d'inscription: 05/08/04 Publications récentes
LPS-47215 is meant to fix the issue. I'm checking with Shuyang to see why that is the case for Windows and why this ticket would fix it. In any case, it's merged upstream. Thx.
thumbnail
Moisés Belda, modifié il y a 9 années.

RE: Liferay 6.2 startup slow normal?

Junior Member Publications: 75 Date d'inscription: 20/04/13 Publications récentes
Thanks Brian

I saw pull request... I don't understand exactly why PortletImpl timestamp attribute delays liferay startup on windows enviroments....
We stay tuned to know the reason!
thumbnail
Moisés Belda, modifié il y a 9 années.

RE: Liferay 6.2 startup slow normal?

Junior Member Publications: 75 Date d'inscription: 20/04/13 Publications récentes
Hi!
A new discover for windows 8.1 slow startup times.

I changed file "ServletContextUtil.java" in getLastModified() method.

I change :


URLConnection urlConnection = url.openConnection();
    if (urlConnection.getLastModified() > lastModified)
   { 
      lastModified = urlConnection.getLastModified(); }


for


File file = new File(realPath);
	if (file.lastModified() > lastModified) {
		lastModified = file.lastModified();
	}


I compiled portal-service.jar and....

- The first one is liferay 6.2 way to get lastModified timestamp from file. => startup time with widnows 8.1, about 15 minutes, and tomcat unresponsive about 4 minutes more after tomcat startup message.
- The second one is liferay 6.1.x and 6.0.x way to get lastModified time timestampt from file => startup time with windows 8.1, about 3 minutes, and there is not tomcat unresponsive after tomcat startup message!!

Could it be any openned connection restriction of windows? (for URLConnection urlConnection = url.openConnection())

This theory explains why Linux with the same computer works well with url.openConnection without any delay.

For more info check LPS => LPS-47215
thumbnail
Moisés Belda, modifié il y a 9 années.

RE: Liferay 6.2 startup slow normal?

Junior Member Publications: 75 Date d'inscription: 20/04/13 Publications récentes
Some more tests

I bought a Samsung SSD Hard Disk and launched liferay 6.2 from windows 8.1 on this SSD...

- Method getTimestamp with url.openConnection() => 10 minutes startup
- Method getTimestamp with File read (old liferay 6.0.x/6.1.x way) => 2,50 minutes startup

url.openConnection kills my startup performance with win 8.1 and SSD disk too.
stephen zambaux, modifié il y a 9 années.

RE: Liferay 6.2 startup slow normal?

Junior Member Publications: 63 Date d'inscription: 03/10/14 Publications récentes
Hi, have the same problem on w2008, is there any patch for Liferay 6.2 ga2?
thumbnail
Juan Gonzalez, modifié il y a 9 années.

RE: Liferay 6.2 startup slow normal?

Liferay Legend Publications: 3089 Date d'inscription: 28/10/08 Publications récentes
Hi Moises, Stephen,

did you check if making the changes made in https://issues.liferay.com/browse/LPS-47215 solves the issue?
stephen zambaux, modifié il y a 9 années.

RE: Liferay 6.2 startup slow normal?

Junior Member Publications: 63 Date d'inscription: 03/10/14 Publications récentes
Yes I tried version 7.0 m1 and it's ok 2 minutes to boot... but it's not ok in 6.2 ga 2 do you have a patch?
stephen zambaux, modifié il y a 9 années.

RE: Liferay 6.2 startup slow normal?

Junior Member Publications: 63 Date d'inscription: 03/10/14 Publications récentes
I tried to make changes in 6.2 ga 2, I already have a very slow startup, Is there someone that can share with me a patched version?
thumbnail
Juan Gonzalez, modifié il y a 9 années.

RE: Liferay 6.2 startup slow normal?

Liferay Legend Publications: 3089 Date d'inscription: 28/10/08 Publications récentes
Hi stephen,

you should use git commits that belongs to LPS-47215 (just search those using known tools like gitk).

Then, try to cherry-pick to your patched branch.
thumbnail
Moisés Belda, modifié il y a 9 années.

RE: Liferay 6.2 startup slow normal?

Junior Member Publications: 75 Date d'inscription: 20/04/13 Publications récentes
Issue fixed in Liferay 6.2 CE GA3!

Liferay 6.2 CE GA3 now avaliable

Great work folks!
thumbnail
James Falkner, modifié il y a 9 années.

RE: Liferay 6.2 startup slow normal?

Liferay Legend Publications: 1399 Date d'inscription: 17/09/10 Publications récentes
Moisés Belda:
Issue fixed in Liferay 6.2 CE GA3!

Liferay 6.2 CE GA3 now avaliable

Great work folks!


emoticon