Foren

Liferay 7.0 ga3 very slow start

Karen Bellware, geändert vor 7 Jahren.

Liferay 7.0 ga3 very slow start

New Member Beiträge: 9 Beitrittsdatum: 01.03.17 Neueste Beiträge
Hi, I am a web development student and the book we are using is for Liferay 6.2 ga2, so I cannot follow it very much given the different versions. Therefore, I followed a tutorial for 7.0 to get started. Once I click on the startup.bat file in the tomcat bin folder, it takes at LEAST 15 minutes to load the server and bring up the Lifray homepage. Sometimes, it can take up to 30 minutes to bring up the homepage. As a student with deadlines, this is very frustrating! It makes my limited time to do assignments between work, kids, sports for the kids, and school very difficult! Is there any way I can speed up the startup time?

I'm running a 64bit Windows 10 Education system with a Pentium dual core CPU, 3.07ghz, 500gb hard drive, 280gb free.

I installed the Lifreay with Tomcat 8 bundle. I have maven and ant installed as well although this has nothing to do with the startup.

As you can see in the attached log copy, it took from 4:12 to 4:36 to start.

Thanks
thumbnail
David H Nebinger, geändert vor 7 Jahren.

RE: Liferay 7.0 ga3 very slow start

Liferay Legend Beiträge: 14916 Beitrittsdatum: 02.09.06 Neueste Beiträge
First, running Liferay on only one GB memory is way too low. Increase to 4 or 8 gigs to give it room to move.

Second, this log is from a first time launch when the HSQL database is getting created and populated. As long as you are not deleting your data directory every time, this kind of thing will not recur and startup will be much faster.
Karen Bellware, geändert vor 7 Jahren.

RE: Liferay 7.0 ga3 very slow start

New Member Beiträge: 9 Beitrittsdatum: 01.03.17 Neueste Beiträge
I am a student and have never used Liferay or Tomcat before, so can you please tell me how I can increase the memory for Tomcat? I have no idea how to begin.

Yes, that was the first run because deleted everything and started from scratch in hopes that it would move faster; however, the second run after reinstalling (or re-downloading and restarting the server), it actually took OVER an HOUR to load!

Here's that log attached.
thumbnail
David H Nebinger, geändert vor 7 Jahren.

RE: Liferay 7.0 ga3 very slow start

Liferay Legend Beiträge: 14916 Beitrittsdatum: 02.09.06 Neueste Beiträge
In the tomcat-8.0.32/bin directory you'll find setenv.bat. If you edit this file, you'll find near the end the -Xmx1024m, change this to 4096 or 8192 if you have it.

Yeah, after looking at your log file it's clear that you're really well under a necessary minimum memory, you're running embedded ElasticSearch (the default) and it's triggering lots of GC activity.

If you increase your memory allocation, you'll notice a huge difference.
Karen Bellware, geändert vor 7 Jahren.

RE: Liferay 7.0 ga3 very slow start

New Member Beiträge: 9 Beitrittsdatum: 01.03.17 Neueste Beiträge
Thank you, after updating the file to include 8192 as the space, the load time still took 21 minutes (see attached). Is there anything else I can improve upon to speed up the load time?

One more question, my class textbook is geared for Liferay 6.2.c3.ga2 and it tells me to Admin > Control Panel > Site Administration > My Sites, but I don't see these options in Liferay 7.0.ga3. Where can I find Site Administration or My Sites?

Thanks again!
Karen Bellware, geändert vor 7 Jahren.

RE: Liferay 7.0 ga3 very slow start

New Member Beiträge: 9 Beitrittsdatum: 01.03.17 Neueste Beiträge
I did a quick search of how to disable Elastic Search and read through this: https://dev.liferay.com/discover/reference/-/knowledge_base/7-0/elasticsearch-settings

However, I don't have the file they are referring to, where else might it be?
thumbnail
Olaf Kock, geändert vor 7 Jahren.

RE: Liferay 7.0 ga3 very slow start

Liferay Legend Beiträge: 6403 Beitrittsdatum: 23.09.08 Neueste Beiträge
Karen Bellware:
Thank you, after updating the file to include 8192 as the space, the load time still took 21 minutes (see attached). Is there anything else I can improve upon to speed up the load time?


There are several areas in your log file that take an awfully long amount of time. The first one I see is

03-Mar-2017 03:15:06.925 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying configuration descriptor C:\liferay-ce-portal-7.0-ga3\tomcat-8.0.32\conf\Catalina\localhost\ROOT.xml
03-Mar-2017 03:19:00.620 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log No Spring WebApplicationInitializer types detected on classpath
Loading jar:file:/C:/liferay-ce-portal-7.0-ga3/tomcat-8.0.32/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
Loading jar:file:/C:/liferay-ce-portal-7.0-ga3/tomcat-8.0.32/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
Loading jar:file:/C:/liferay-ce-portal-7.0-ga3/tomcat-8.0.32/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
Loading file:/C:/liferay-ce-portal-7.0-ga3/portal-setup-wizard.properties
03:20:00,022 INFO  [localhost-startStop-1][DialectDetector:75] Determine dialect for MySQL 5.7


I'm not sure what this could be - the only thing that would remotely explain is a doctype lookup that times out - does your system have internet access - or can you enable it for testing purposes if it doesn't?

There's another one that I can't explain other than through some timeouts

03:20:40,157 INFO  [Start Level: Equinox Container: 107c903a-c0ff-0016-1848-b314c840514d][BundleStartStopLogger:35] STARTED org.apache.commons.io_1.4.0 [25]
03:21:54,332 INFO  [Start Level: Equinox Container: 107c903a-c0ff-0016-1848-b314c840514d][BundleStartStopLogger:35] STARTED org.apache.felix.bundlerepository_2.0.2 [26]


And I'm not sure where those ElasticSearch messages come from. As you speak of 6.2 as well, do you happen to have the setting

index.on.startup=true


in your portal-ext.properties? This might come from a particular cluster setup if you used a local lucene in the past and needed to make sure the cluster was current when started. This would, of course, reindex everything on startup - which might be a significant effort depending on the amount of data you have. Note that this is only a very wild guess - I don't know when in the startup sequence this would happen.

Karen Bellware:
One more question, my class textbook is geared for Liferay 6.2.c3.ga2 and it tells me to Admin > Control Panel > Site Administration > My Sites, but I don't see these options in Liferay 7.0.ga3. Where can I find Site Administration or My Sites?


Click Product Menu, sidebar opens. Click your name, then "My Dashboard" for "My Sites". The general Site Administration can be found through ControlPanel / Sites / Sites.
Karen Bellware, geändert vor 7 Jahren.

RE: Liferay 7.0 ga3 very slow start

New Member Beiträge: 9 Beitrittsdatum: 01.03.17 Neueste Beiträge
Hello Olaf and thank you for your assistance. I apologize for my delayed reply.

My tomcat is still taking forever to start, there has been no improvement since my last post.

Unfortunately, I am a student and brand new to Tomcat so the time out snippets you posted are kind of foreign to me, but I do have hard wired internet access (I'm not working over wifi, I'm directly plugged into my router/modem)

As for the line you asked me to look for in my settings, I do not have that line. The elastic search is, to my understanding, the default setting for Tomcat and I'm not sure how to turn it off and if I should or not.

Because I have not found a solution to why it takes about an hour to start, I decided to just move on in my textbook and deal with the slow start until I get a solution. With that said, I am getting the following error when trying to run a clean install with maven using ant:


[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.8:run (gulp) on project first-portlet: An Ant BuildException has occured: Execute failed: java.io.IOException: Cannot run program "gulp": CreateProcess error=2, The system cannot find the file specified
[ERROR] around Ant part ...<exec executable="gulp">... @ 5:27 in C:\liferay-ce-portal-7.0-ga3\workspace\first-portlet\target\antrun\build-main.xml
</exec>


Does this have to do with my Tomcat settings?
Karen Bellware, geändert vor 7 Jahren.

RE: Liferay 7.0 ga3 very slow start

New Member Beiträge: 9 Beitrittsdatum: 01.03.17 Neueste Beiträge
Hello all, my Liferay Tomcat server is still taking about an hour to start! I cannot even use it within Eclipse Neon because of time outs.

I was going to try to overlook it and just keep moving on, but at this point, I'm ready to throw my computer out the window I'm so frustrated.

I really need some help to get my start time down to below 20 minutes at max. Attached is my log from today. In this case, it's been nearly two hours and the Liferay homepage still has not loaded.
thumbnail
Jennis Vaishnav, geändert vor 7 Jahren.

RE: Liferay 7.0 ga3 very slow start

Junior Member Beiträge: 59 Beitrittsdatum: 01.02.17 Neueste Beiträge
Karen Bellware:
Hello Olaf and thank you for your assistance. I apologize for my delayed reply.

My tomcat is still taking forever to start, there has been no improvement since my last post.

Because I have not found a solution to why it takes about an hour to start, I decided to just move on in my textbook and deal with the slow start until I get a solution. With that said, I am getting the following error when trying to run a clean install with maven using ant:

Does this have to do with my Tomcat settings?


Hello Karen,

Kindly see this discussion:
Liferay 7 setup in eclipse neon
See if you have missed any steps while setting up of liferay.
And regarding the time for first time setup it took me 73 minutes and 1 second emoticon I exactly remembered that, and after that it takes usually takes 4 to 5 minutes(approximately) to start the server. And for reference I took help of this book Liferay in Action , anyways the book will guide you with what liferay is all about its setup, if you can read that with patience. Hope this helps emoticon
Karen Bellware, geändert vor 7 Jahren.

RE: Liferay 7.0 ga3 very slow start

New Member Beiträge: 9 Beitrittsdatum: 01.03.17 Neueste Beiträge
Thanks for your reply. This is not a first setup. I was using the Liferay Tomcat bundle with ant and maven from the command line, but due to problems with trying to follow my textbooks 6.2 version tutorial I resorted to another at 7.0 tutorial with eclipse.

Neither are working right and Tomcat takes an hour to connect every time!