Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
hartenthaler opened this issue Mar 22, 2024 · 11 comments
Open

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

hartenthaler opened this issue Mar 22, 2024 · 11 comments
Labels
documentation Improvements or additions to documentation

Comments

@hartenthaler
Copy link

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
Copy link
Member

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
Copy link
Author

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
Copy link
Member

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

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
Copy link
Author

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

@DavidMStraub
Copy link
Member

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

@DavidMStraub
Copy link
Member

This is still not resolved, is it?

@hartenthaler
Copy link
Author

Yes, this is still open. Started from scratch again, and uploaded XML, using the actual versions of Gramps Desktop 5.2.3 and GrampsHub.

@DavidMStraub
Copy link
Member

I think the slow XML import is now solved by #530.

And I think I also understood the 504 on sync - it is because when using sync, all changes are done as part of a single HTTP request, not as a background task like the XML import, so depending on server configuration, that will time out after 1 or 2 minutes. That means that the sync addon is not suited to synchronize an entire tree from A to B. The right workflow would be to import an XML file and then synchronize. We should make sure our documentation reflects this fact.

Going forward, an option could be to have the sync addon offer an import if it finds the remote side is empty, but that would require some work and anyway shouldn't be tracked here.

So I'll change the label to documentation and close once I've checked that it's documented correctly.

@DavidMStraub DavidMStraub added documentation Improvements or additions to documentation and removed performance labels Aug 7, 2024
@hartenthaler
Copy link
Author

The SYNC problem is not a documentation problem. It is a still existing real problem. I followed your recommendation: export of XML at Gramps Desktop and import of XML in an empty tree at GrampsHub. Finally, I was uploading all media files successfully to GrampsHub. Rebuilding search index at GrampsHub. So both databases should now be identical. Starting SYNC at Gramps Desktop still results in a 504 error after about 60 seconds. Tested the SYNC again today and the 504 is still there.

@DavidMStraub
Copy link
Member

It may be a real problem, but of https://github.com/DavidMStraub/gramps-web-sync, not https://github.com/gramps-project/gramps-web-api 🙂 - That's what this issue is about.

@DavidMStraub
Copy link
Member

To be precise, there is nothing in Gramps Web API that can be improved to resolve this sync problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants