Upgrade from 4.0.22 to 4.2.5 - LockError() while Search Indexing

When things don't work as they should.
Post Reply
bernroth
Posts: 17
Joined: Mon Oct 05, 2020 4:10 am

Upgrade from 4.0.22 to 4.2.5 - LockError() while Search Indexing

Post by bernroth »

Dear Community!

We recently upgraded our Mayan EDMS installation (based on docker-compose) from 4.0.22 to 4.2.5.

On the previous installation, we already have enabled Whoosh to have quick fulltext search functionality.

After upgrade we discovered that the search index was empty (no results found for even simple queries).
I decided to let the system recreate the search index.
It starts and works for a while, then thows errors like that:

Code: Select all

app_1                                     | [2022-06-15 15:58:13,715: ERROR/ForkPoolWorker-618] Task mayan.apps.dynamic_search.tasks.task_index_instance[dceae3b8-5938-4ca4-918b-8d95088744d6] raised unexpected: LockError()
app_1                                     | Traceback (most recent call last):
app_1                                     |   File "/opt/mayan-edms/lib/python3.9/site-packages/celery/app/trace.py", line 450, in trace_task
app_1                                     |     R = retval = fun(*args, **kwargs)
app_1                                     |   File "/opt/mayan-edms/lib/python3.9/site-packages/celery/app/trace.py", line 731, in __protected_call__
app_1                                     |     return self.run(*args, **kwargs)
app_1                                     |   File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/dynamic_search/tasks.py", line 93, in task_index_instance
app_1                                     |     raise self.retry(exc=exception)
app_1                                     |   File "/opt/mayan-edms/lib/python3.9/site-packages/celery/app/task.py", line 714, in retry
app_1                                     |     raise_with_context(exc)
app_1                                     |   File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/dynamic_search/tasks.py", line 88, in task_index_instance
app_1                                     |     SearchBackend.get_instance().index_instance(
app_1                                     |   File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/dynamic_search/backends/whoosh.py", line 174, in index_instance
app_1                                     |     lock = LockingBackend.get_backend().acquire_lock(
app_1                                     |   File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/lock_manager/backends/base.py", line 32, in acquire_lock
app_1                                     |     return cls._acquire_lock(name=name, timeout=timeout)
app_1                                     |   File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/lock_manager/backends/redis_lock.py", line 20, in _acquire_lock
app_1                                     |     return RedisLock(name=name, timeout=timeout)
app_1                                     |   File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/lock_manager/backends/base.py", line 48, in __init__
app_1                                     |     return self._init(*args, **kwargs)
app_1                                     |   File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/lock_manager/backends/redis_lock.py", line 73, in _init
app_1                                     |     raise LockError
app_1                                     | mayan.apps.lock_manager.exceptions.LockError

Is the root cause of the problem known?

Possibly some parts or data from the previous version is playing a role.

Is there a possibility to reset most settings, search indizes or cache data to default?

I am looking to a simple approach to make the system usable again.
Currently we can't search our 30.000 documents and half a million pages...

Thanks for your help!
Best regards,
Bernhard
legosiv
Posts: 10
Joined: Thu Jan 13, 2022 10:29 am

Re: Upgrade from 4.0.22 to 4.2.5 - LockError() while Search Indexing

Post by legosiv »

I am having the same issue. Were you able to find any solutions?
bernroth
Posts: 17
Joined: Mon Oct 05, 2020 4:10 am

Re: Upgrade from 4.0.22 to 4.2.5 - LockError() while Search Indexing

Post by bernroth »

You should probably switch to another search engine like Elastic Search.
Post Reply