Search Engine - Rebuild Index does not work #6064
-
Hello, I've got a couple of Wiki.js instances running in a Kubernetes cluster. Wiki.js instances are started with HELM and PostgreSQL is used as database. But I have one instance of Wiki.js, which doesn't succeed to build an index. This results in searches non returning any hits. In the pod's logs I see this:
Then nothing happens... in Wiki.js I see a blue spinning circle in the upper right corner and after some time it runs into a request timeout (because of 60 seconds default timeouts in my ingress). I thought that maybe the request really takes longer and increased timouts up to 1 hour for testing, but it didn't help - the circle spins for 1 hour until the timeout appears. Next I thought there could be something wrong with the PostgreSQL database instance. So I've deployed an Elasticsearch instance and tested with this one. Same result: it just runs into a timeout. I verified that Elasticsearch works by using it with a different Wiki.js instance. Logs in the working instance look like this:
In the non working instance I just see this, afterwards it remains like this until the timeout appears:
The Wiki.js instance, where searches don't work, has about 150 pages. It doesn't seem to be that big and I guess it should be indexed in a few seconds, if everything works well. Any ideas what could be wrong here? Or advices on what to change or test? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
I've done some more testing today and found out that there are more things, which do not work on that Wiki.js instance. For example storage to local file system or a git repository also does not work. It looks like wiki.js cannot read or export contents from the database for some reason. But when navigating through pages in the Wiki.js UI everything is normal, I can read, edit and create pages. Any ideas what could be wrong with the database or what I could do to fix these problems? |
Beta Was this translation helpful? Give feedback.
-
I've done a lot more testing today and found something interesting. I did a DB backup and deleted pages in order to find out if a page causes problems. And in fact rebuild index started to work after I deleted some pages. After several further tests I found out that it doesn't depend on a specific page but the number of pages. As soon as there are 100 or more pages in my Wiki.js instance, it stops working. I modified the rebuild function in I guess this is not standard behaviour, or is it? Any ideas why there could be such a restriction and how I could make 100 or more pages work? Here's the slightly modified rebuild function, that I used for testing:
|
Beta Was this translation helpful? Give feedback.
-
Today I did a DB dump from Kubernetes and set Wiki.js and DB up locally. Everything worked fine. Then I created a new PostgreSQL DB in Kubernetes and reimported the dump there. Then configured Wiki.js to use the new database. Now everything works fine. I have no idea what was wrong with the old DB, but there must have been something wrong (or configured differently) with it. |
Beta Was this translation helpful? Give feedback.
-
My ovservations with using Wiki.js 2.5.301 and elasticsearch as search provider are:
the result being, that I can only search for pages that have been edited since „Rebuild Index“ has been clicked and nothing else |
Beta Was this translation helpful? Give feedback.
Today I did a DB dump from Kubernetes and set Wiki.js and DB up locally. Everything worked fine.
Then I created a new PostgreSQL DB in Kubernetes and reimported the dump there. Then configured Wiki.js to use the new database.
Now everything works fine.
I have no idea what was wrong with the old DB, but there must have been something wrong (or configured differently) with it.