Fórum

Too many hibernate queries

Vasu Kumar Piduru, modificado 10 Anos atrás.

Too many hibernate queries

Junior Member Postagens: 37 Data de Entrada: 05/10/09 Postagens Recentes
Hi Team,

We have weired problem with login process, when a user is trying to login to the system it takes too much time by firing queries as attached in the file.

What would be the reason to fire these many queries, its all related to resource permissions. We have around 400+ roles in the liferay, would this cause liferay to fire these many queries?


Thanks
Vasu
thumbnail
Sampsa Sohlman, modificado 10 Anos atrás.

RE: Too many hibernate queries

Regular Member Postagens: 230 Data de Entrada: 27/09/07 Postagens Recentes
Hi Vasu,

Which version of Liferay you are running?

It seems that your Resource permission queries does not hit to cache.

Sunny summer regards,

Sampsa
Vasu Kumar Piduru, modificado 10 Anos atrás.

RE: Too many hibernate queries

Junior Member Postagens: 37 Data de Entrada: 05/10/09 Postagens Recentes
Thank you for youre response.

The version of liferay we are using is 6.0.6 CE, deployed on tomcat and the database used is Oracle.

If I have to force Resource Permissions to fetch from cache instead of database what changes should be made in the configuration.

Thanks
Vasu
thumbnail
Sampsa Sohlman, modificado 10 Anos atrás.

RE: Too many hibernate queries

Regular Member Postagens: 230 Data de Entrada: 27/09/07 Postagens Recentes
Hi Vasu,

Liferay 6.1.1 permission management has been improved and it makes less queries on database compared to Liferay 6.0.6.
Vasu Kumar Piduru, modificado 10 Anos atrás.

RE: Too many hibernate queries

Junior Member Postagens: 37 Data de Entrada: 05/10/09 Postagens Recentes
Hi thank you verymuch for your response.

could you please confirm the below points please.

1. These queries are delaying the user login, user who has more roles is taking long time to login.
NOTE: We read user roles from DB and set them to liferay at the time of user login.
2. We have around 300+ roles created in liferay, is this causing to execute these many queries?

3. Any way to control this in behavious in 6.0.6?

4. Unfortunately we can't upgrade to 6.1, so do you have any suggestions for us?

Kindly answers the points, which would help us to conclude.


Thanks
Vasu
thumbnail
Sampsa Sohlman, modificado 10 Anos atrás.

RE: Too many hibernate queries

Regular Member Postagens: 230 Data de Entrada: 27/09/07 Postagens Recentes
Hi Vasu,

Vasu Kumar Piduru:
could you please confirm the below points please.


I have encountered similar kind of case and symptoms where same. It was also 6.0.x portal. We managed to get better performance by upgrading to 6.1.x.

Vasu Kumar Piduru:
1. These queries are delaying the user login, user who has more roles is taking long time to login.
NOTE: We read user roles from DB and set them to liferay at the time of user login.
2. We have around 300+ roles created in liferay, is this causing to execute these many queries?


If your role amount will rise then your performance will degrade even more.

Vasu Kumar Piduru:
3. Any way to control this in behavious in 6.0.6?


Control amount of the roles that you are having. Less roles better. You can also try to verify that everything is on cache and tune your cache settling accordingly. Anyway, if your users are logging in rarely. You might to make somekind of mechanism to fill cache after every restart of the portal.

Vasu Kumar Piduru:
4. Unfortunately we can't upgrade to 6.1, so do you have any suggestions for us?


To fix this you needs code/move changes to your portal, so I the migration path to 6.1.x would be better.

You can take a look issues from our JIRA http://issue.liferay.com , but I don't know the solving issue(s) for this.

Kind regards,

Sampsa
thumbnail
David H Nebinger, modificado 10 Anos atrás.

RE: Too many hibernate queries

Liferay Legend Postagens: 14919 Data de Entrada: 02/09/06 Postagens Recentes
Vasu Kumar Piduru:
We have around 300+ roles created in liferay, is this causing to execute these many queries?


If I shoot myself in the foot, would that be the cause of my limping?

Sorry, couldn't help it...

If you have 300+ roles, then I think you've done some things wrong. I can't imagine why you would ever need so many unless you were being overly-granular with your roles...
Vasu Kumar Piduru, modificado 10 Anos atrás.

RE: Too many hibernate queries

Junior Member Postagens: 37 Data de Entrada: 05/10/09 Postagens Recentes
Sampsa Sohlman:
Hi Vasu,

Which version of Liferay you are running?

It seems that your Resource permission queries does not hit to cache.

Sunny summer regards,

Sampsa


Dear Sampsa,

How do we hit cache? , any suggestions on this. Is there any bug/forum which talks about it.

This is really a big problem for us now, if you could point me to some forum/help that would be really appriciated.

Thanks
Vasu