{"action":"created","issue":{"url":"https://api.github.com/repos/syncthing/syncthing/issues/1434","labels_url":"https://api.github.com/repos/syncthing/syncthing/issues/1434/labels{/name}","comments_url":"https://api.github.com/repos/syncthing/syncthing/issues/1434/comments","events_url":"https://api.github.com/repos/syncthing/syncthing/issues/1434/events","html_url":"https://github.com/syncthing/syncthing/issues/1434","id":60403361,"number":1434,"title":"Syncthing GUI can inundate Syncthing with pending requests","user":{"login":"canton7","id":568104,"avatar_url":"https://avatars.githubusercontent.com/u/568104?v=3","gravatar_id":"","url":"https://api.github.com/users/canton7","html_url":"https://github.com/canton7","followers_url":"https://api.github.com/users/canton7/followers","following_url":"https://api.github.com/users/canton7/following{/other_user}","gists_url":"https://api.github.com/users/canton7/gists{/gist_id}","starred_url":"https://api.github.com/users/canton7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/canton7/subscriptions","organizations_url":"https://api.github.com/users/canton7/orgs","repos_url":"https://api.github.com/users/canton7/repos","events_url":"https://api.github.com/users/canton7/events{/privacy}","received_events_url":"https://api.github.com/users/canton7/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/syncthing/syncthing/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/syncthing/syncthing/labels/help-wanted","name":"help-wanted","color":"5319e7"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-03-09T20:21:08Z","updated_at":"2015-04-08T08:19:10Z","closed_at":"2015-04-01T12:10:45Z","body":"Hi,\r\n\r\nAs mentioned in #867, I'm seeing issues where GUI starts sending polls to Syncthing before the previous polls have completed. This snowballs, resulting in the Syncthing having to process lots of duplicate requests. Everything does recover, but it takes a fair while.\r\n\r\nNow, Syncthing is running on a low-power device here - an ODROID-C1 - but the GUI could still play more nicely.\r\n\r\nI've yet to find a nice way of capturing a single screenshot which contains all the information I want to convey. So, I'll describe what happens for now:\r\n\r\n1. Load the GUI. A bunch of requests go out, and typically 'connections' or 'report' can take up to a minute to respond.\r\n2. In the meantime, the GUI has requested the 'model' resource for all folders, and all connections for all devices on all models. This adds up to quite a lot of pending connections!\r\n3. 'system', 'connections', and 'errors' then start stacking up - I can get quite a few simultaneous sets of these 3 before the original holdup clears.\r\n\r\nSuggestions:\r\n - Don't schedule one poll before the previous poll has finished. \r\n - Consider limiting the total number of pending requests.\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/syncthing/syncthing/issues/comments/90839181","html_url":"https://github.com/syncthing/syncthing/issues/1434#issuecomment-90839181","issue_url":"https://api.github.com/repos/syncthing/syncthing/issues/1434","id":90839181,"user":{"login":"canton7","id":568104,"avatar_url":"https://avatars.githubusercontent.com/u/568104?v=3","gravatar_id":"","url":"https://api.github.com/users/canton7","html_url":"https://github.com/canton7","followers_url":"https://api.github.com/users/canton7/followers","following_url":"https://api.github.com/users/canton7/following{/other_user}","gists_url":"https://api.github.com/users/canton7/gists{/gist_id}","starred_url":"https://api.github.com/users/canton7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/canton7/subscriptions","organizations_url":"https://api.github.com/users/canton7/orgs","repos_url":"https://api.github.com/users/canton7/repos","events_url":"https://api.github.com/users/canton7/events{/privacy}","received_events_url":"https://api.github.com/users/canton7/received_events","type":"User","site_admin":false},"created_at":"2015-04-08T08:19:10Z","updated_at":"2015-04-08T08:19:10Z","body":"Maybe I'm missing something, but the sequence of API calls when the browser is first loaded, and when it's idle, is identical between 0.10.30 and 0.11.0-beta4. The difference appears to be that we no longer hti the `completion` resource when the `LocalIndexUpdated` or `RemoteIndexUpdates` events are received, but that doesn't affect the issue as I reported it."}}