gramps-project / gramps-web-api

A RESTful web API for Gramps
GNU Affero General Public License v3.0
71 stars 38 forks source link

Sync between Desktop and Gramps Web does not work as expected #503

Open hartenthaler opened 3 months ago

hartenthaler commented 3 months ago

I have an empty tree at GrampsWeb and my local tree with about 12000 persons in Gramps Desktop. When starting "Gramps Web Sync" the process starts after authorisation. Then it idles for several minutes and finally reports that there are deleted persons at Gramps Web. Then I select the option "Sync local to Web" (the second of the three options) in order to copy all the local records to Gramps Web. This stops immediately with the error message "Server authorisation error".

DavidMStraub commented 3 months ago

It's hard to diagnose without more details.

In any case, it will be much more efficient to first import a Gramps XML file in Gramps Web before the first sync. The sync addon is meant to sync two trees that are derivatives of each other, and having one completely blank side is not a good starting point.

hartenthaler commented 3 months ago

I tried now the other way as you suggested. However, importing the Gramps XML file in GrampsHub was very slow. After some hours the import was frozen at 52%. Finally this morning it reached 100%. I started syncing the now identical trees (local and GrampsHub) again. After a short time, the process stopped with a "504" error when accessing the server. I tried it a second time with the same error.

DavidMStraub commented 3 months ago

Thanks for the info. You are stress testing Gramps Web, which is useful :slightly_smiling_face:

According to the logs the import took 12.5 hours and completed without errors. I suspect the time was spend mostly updating the search index, not importing the objects (actually the new progress indicator shows what it's currently doing when you hover over it).

It would be useful if you could trigger an "update search index" by clicking the button in the admin settings and tell me at what time you clicked it. Then we would find out how long the reindex on its own takes for your tree.

hartenthaler commented 3 months ago

I started the "update search index" at 24.03.2024 17:58. The process stoped successfully at 18:05 (7 minutes later).

DavidMStraub commented 3 months ago

Thanks! So it's the XML import after all that takes so long. Good to know.

DavidMStraub commented 2 months ago

This is still not resolved, is it?