Afresco startup too slow

cancel
Showing results for 
Search instead for 
Did you mean: 
luca
Established Member

Re: Afresco startup too slow

Jump to solution

I have taken a look in the database and I saw this:

  • 3:05 Alfresco start
  • Starting sysAdmin, Authentication subsystem
  • 3:19 no more log in catalina.out till 5:29!
  • 3:28 Here it starts doing the query below till 7:47
  • 5:29 restart log: Startup of Search, thirdparty, OOoDirect, Transformers subsystems
  • 5:40 no more log in catalina.out again till 7:47!
  • 7:47 restart log: Starting fileServers, imap, email, Subscriptions subsystems
  • 7:48 Alfresco startup completed

The query is this:

select
            node.id                 as node_id,
            node.version            as node_version,
            prop.qname_id           as qname_id,
            prop.locale_id          as locale_id,
            prop.list_index         as list_index,
            prop.actual_type_n      as actual_type_n,
            prop.persisted_type_n   as persisted_type_n,
            prop.boolean_value      as boolean_value,
            prop.long_value         as long_value,
            prop.float_value        as float_value,
            prop.double_value       as double_value,
            prop.string_value       as string_value,
            prop.serializable_value as serializable_value
        from
            alf_node node
            join alf_node_properties prop on (prop.node_id = node.id)
         WHERE  node_id in
                ( $1, ..., $256 )

Why is it doing so many queries like that? It is possible that it is reindexing all the documents?
What can I do to understand what is it doing?
afaust
Master

Re: Afresco startup too slow

Jump to solution

This type of query is typical for preloading a set of nodes into caches. That is usually a part of doing any kind of queries e.g. against SOLR.

luca
Established Member

Re: Afresco startup too slow

Jump to solution

Ok, so you are telling me that Alfresco is loading nodes in the cache and this could be the reason that I see these logs:

 2017-03-16 03:21:15,658  WARN  [cache.node.nodesTransactionalCache] [localhost-startStop-1] Transactional update cache 'org.alfresco.cache.node.nodesTransactionalCache' is full (125000).  2017-03-16 03:21:40,089  WARN  [cache.node.aspectsTransactionalCache] [localhost-startStop-1] Transactional update cache 'org.alfresco.cache.node.aspectsTransactionalCache' is full (65000).  2017-03-16 03:21:43,413  WARN  [cache.node.propertiesTransactionalCache] [localhost-startStop-1] Transactional update cache 'org.alfresco.cache.node.propertiesTransactionalCache' is full (65000).

But I don't undestand why it is doing this, what do you mean by "That is usually a part of doing any kind of queries e.g. against SOLR."?

By the way, I'm not using SOLR, do you think that could solve my problems?

afaust
Master

Re: Afresco startup too slow

Jump to solution

With that I mean that this type of query is usually only done when some code / component is doing a query using the SearchService.query() operation, which most of the time involves a SOLR (or Lucene) query.

By default Alfresco should not do any intensive queries during startup on its own, so this might be triggered by some kind of custom code or 3rd party addon.

luca
Established Member

Re: Afresco startup too slow

Jump to solution

We have only a custom authentication filter based on Shibbolet and the alfresco-trashcan-cleaner module that is scheduled to run only in the evening.

I have disabled the alfresco-trashcan-cleaner module to be sure, but we don't have any other 3rd party addon.

What is the best way to check what Alfresco is doing on startup? Where can I put some debug point to understand better what is happening?

mehe
Senior Member II

Re: Afresco startup too slow

Jump to solution

Hi Luca (I'm suffering with you),

have you already tried to increase the log levels?

Maybe

log4j.logger.org.alfresco.repo.node.index.AbstractReindexComponent=DEBUG

log4j.logger.org.alfresco.repo.node.index.FullIndexRecoveryComponent=DEBUG

log4j.logger.org.alfresco.repo.node.index.IndexTransactionTracker=DEBUG

can show what is happening inside...

But there are a lot of log4j entries that could help and experimenting with them is a pain with such long boot times.

luca
Established Member

Re: Afresco startup too slow

Jump to solution

Great news, I succesfully bring back the startup times to 21 min thanks to a tiny modifications to a single query!

The query is the one that I pointed out in a previous post and the complete explanation of the problem is described here: https://issues.alfresco.com/jira/browse/MNT-15576

Thank to all who helped me!

sakbar
Customer

Re: Afresco startup too slow

Jump to solution

I'm having the same issue (slow startup). The link you provided returns 404, I would appreciate if you can help me resolve this issue.

AidenZ
Member II

Re: Afresco startup too slow

Jump to solution

Hi Luca,


I am also facing a similar problem now. Cloud you share your modification process?

Unfortunately, the link you shared is already 404

Thanks,
Aiden

hr61369256
Member II

Re: Afresco startup too slow

Jump to solution

Sometimes it's really frustrating how people behave :-(   ... why does he not correct the link after several requests doing that?