Forums de discussion

liferay 7 startup very slow

Giovanni Bricconi, modifié il y a 6 années.

liferay 7 startup very slow

New Member Publications: 6 Date d'inscription: 02/06/15 Publications récentes
hello

please have a look to my startup log, every time I restart the sever just after elasticsearch start there is a big idle period. cpu usage is very low or null. I'm using liferay-ce-portal-7.0-ga4 on a google cloud instance 1 cpu Intel(R) Xeon(R) CPU @ 2.30GHz , 4gb ram 2.5 allocated to liferay.

could you give me some advices?

thanks

12:37:30,172 INFO [elasticsearch[Caretaker][clusterService#updateTask][T#1]][service:570] [Caretaker] new_master {Caretaker}{eItyQqTcQm-ytrpOrdDjKw}{local}{local[1]}{local=true}, reason: local-disco-initial_connect(master)
12:37:30,362 INFO [localhost-startStop-1][http:94] [Caretaker] publish_address {127.0.0.1:9200}, bound_addresses {127.0.0.1:9200}
12:37:30,371 INFO [localhost-startStop-1][node:274] [Caretaker] started
12:37:30,396 INFO [elasticsearch[Caretaker][clusterService#updateTask][T#1]][gateway:277] [Caretaker] recovered [2] indices into cluster_state
12:37:31,735 INFO [elasticsearch[Caretaker][clusterService#updateTask][T#1]][allocation:238] [Caretaker] Cluster health status changed from [RED] to [GREEN] (reason: [shards started [[liferay-20116][0]] ...]).


12:51:48,953 INFO [localhost-startStop-1][StartupAction:118] There are no patches installed
12:51:49,257 INFO [localhost-startStop-1][BaseDB:499] Database supports case sensitive queries
12:51:51,443 INFO [localhost-startStop-1][PluginPackageUtil:1004] Reading plugin package for the root context
12:51:52,797 INFO [localhost-startStop-1][AutoDeployDir:185] Auto deploy scanner started for /home/liferay/liferay-ce-portal-7.0-ga4/deploy
12:52:00,119 INFO [liferay/scheduler_dispatch-4][PluginPackageUtil:1268] Reloading repositories
thumbnail
Jorge Díaz, modifié il y a 6 années.

RE: liferay 7 startup very slow

Liferay Master Publications: 753 Date d'inscription: 09/01/14 Publications récentes
It seems you are using embedded Elasticsearch, isn't it?
If you configure a remote Elasticsearch, you will speed up start time.
Note that embedded Elasticsearch is noy supported for production environment.

Also think about increasing Liferay memory to 4gb (and increase machine memory)
Giovanni Bricconi, modifié il y a 6 années.

RE: liferay 7 startup very slow

New Member Publications: 6 Date d'inscription: 02/06/15 Publications récentes
Yes I'm using the embedded elasticsearch: since I have just started working on a test node I didn't configure an external elasticsearch yet.

the thing I would like to understand is if the startup time is so slow for everybody or if there is some issue with my environment.

the cpu is idle during that time, so it seems that liferay or elasticsearch is waiting for some timeout, like searching for other search indexes to show up.

Is it slow also for you at the same step - just after the index becomes green - or does the initialization goes on quicky?

regards

Giovanni
thumbnail
Jorge Díaz, modifié il y a 6 années.

RE: liferay 7 startup very slow

Liferay Master Publications: 753 Date d'inscription: 09/01/14 Publications récentes
Giovanni Bricconi:
Yes I'm using the embedded elasticsearch: since I have just started working on a test node I didn't configure an external elasticsearch yet.
My advice is to configure the remote elasticsearch, even if you configure it in same machine.

Giovanni Bricconi:
the cpu is idle during that time, so it seems that liferay or elasticsearch is waiting for some timeout, like searching for other search indexes to show up.
Get some threadumps and analyze the point where threads are stopped.
More info about threaddumps, search in google, for example: https://dzone.com/articles/how-to-take-thread-dumps-7-options or https://www.javacodegeeks.com/2012/03/jvm-how-to-analyze-thread-dump.html
Francesco Cincotti, modifié il y a 6 années.

RE: liferay 7 startup very slow

New Member Publications: 5 Date d'inscription: 01/10/10 Publications récentes
Hi Giovanni,
it is much better if you configure Elastic on a remote node: even if you manage to shorten the startup time,
using the embedded Elastic slows down the portal if you don't have at least 16 GB RAM on your machine.
I know because I'm just now experiencing the same issue during a LR 6.1 --> DXP portal migration.
BR
Francesco