cancel
Showing results for 
Search instead for 
Did you mean: 

Afresco startup too slow

luca
Star Contributor
Star Contributor

Hi All,

I have some problems because Alfresco is taking too much to startup, actually it is taking 4 hours to complete.

I'm using Alfresco CE 4.2.d and we currently have approximately 700K documents that takes 600GB in total.

Can you help me why Alfresco is taking so much during startup?

Monitoring the machine I don't see any critical issue on memory, CPU or disk access on the startup time.

We are not using Solr, maybe this will have better performance?

I have attached the startup log.

1 ACCEPTED ANSWER

luca
Star Contributor
Star Contributor

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!

View answer in original post

19 REPLIES 19

luca
Star Contributor
Star Contributor

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
Legendary Innovator
Legendary Innovator

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
Star Contributor
Star Contributor

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
Legendary Innovator
Legendary Innovator

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
Star Contributor
Star Contributor

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
Elite Collaborator
Elite Collaborator

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
Star Contributor
Star Contributor

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
Champ on-the-rise
Champ on-the-rise

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
Champ in-the-making
Champ in-the-making

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
Champ in-the-making
Champ in-the-making

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