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

Stop responding when syncing #80

Open
0000marcell opened this issue Feb 24, 2019 · 3 comments
Open

Stop responding when syncing #80

0000marcell opened this issue Feb 24, 2019 · 3 comments

Comments

@0000marcell
Copy link

App stop responding for a moment after any edit
The problem is related with syncing, when i disable automatic sync it works fine
I love to solve the problem if someone could point me to the right direction

I'm on:
OS: Arch Linux x86_64
Python 3.7.1

@0000marcell 0000marcell changed the title Stop responding for a moment Stop responding when syncing Feb 24, 2019
@casutherland
Copy link

Connected fine yesterday, 3/25, last log entries... (Aside: very chatty, is this wss, over https?)

...
2019-03-25 15:31:10,388 [DEBUG] Starting new HTTPS connection (1): api.simperium.com:443
2019-03-25 15:31:10,793 [DEBUG] https://api.simperium.com:443 "GET /1/chalk-bump-f49/note/index?data=1&limit=100&mark=5350795cba5fdc113dd61e28 HTTP/1.1" 200 164724
2019-03-25 15:31:11,046 [DEBUG] Starting new HTTPS connection (1): api.simperium.com:443
2019-03-25 15:31:11,487 [DEBUG] https://api.simperium.com:443 "GET /1/chalk-bump-f49/note/index?data=1&limit=100&mark=530cb9c4ba5fdc112970add3 HTTP/1.1" 200 159953
2019-03-25 15:31:11,942 [DEBUG] Starting new HTTPS connection (1): api.simperium.com:443
2019-03-25 15:31:12,380 [DEBUG] https://api.simperium.com:443 "GET /1/chalk-bump-f49/note/index?data=1&limit=100&mark=52c4aa04ba5fdc4e28601795 HTTP/1.1" 200 132333
2019-03-25 15:31:13,039 [DEBUG] Starting new HTTPS connection (1): api.simperium.com:443
2019-03-25 15:31:13,409 [DEBUG] https://api.simperium.com:443 "GET /1/chalk-bump-f49/note/index?data=1&limit=100&mark=527ae81cba5fdc4ed7fe2724 HTTP/1.1" 200 157176

Laptop resumed today, 3/26, the sncli app is responding, opened a note to edit...

2019-03-26 08:55:12,830 [DEBUG] EXECUTING: ['/usr/bin/vim', '/tmp/tmpx98q4bmm.txt']

After saving the updated note...

2019-03-26 09:27:23,201 [DEBUG] Note updated
2019-03-26 09:27:23,205 [DEBUG] Note content updated (key=833d6df8142a11e98c40d18243993991)

That is all, the app simply stops responding.

Meanwhile, I have taken to manually writing to a local tmp file anytime I use sncli. This issue and #82 might be related.

Next steps: will try to run connection management through a python debugger...

@0000marcell
Copy link
Author

@qcu awesome work, i hope you find the cause of the problem

@samuelallan72
Copy link

(Aside: very chatty, is this wss, over https?)

No - there are just many requests used during syncing...


Sorry I don't have much time to investigate these issues at the moment. There is a configuration option (cfg_tempdir) that you can set to somewhere persistent that may be helpful in preventing data loss. I'm not sure if or when sncli deletes the temporary file after saving though.

The freezing is almost definitely because of syncing. afaik everything runs in the same thread (or maybe not; urwid might do some magic?), so when a long sync runs, it blocks everything.

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

No branches or pull requests

3 participants