{"action":"created","issue":{"url":"https://api.github.com/repos/BrowserSync/browser-sync/issues/367","labels_url":"https://api.github.com/repos/BrowserSync/browser-sync/issues/367/labels{/name}","comments_url":"https://api.github.com/repos/BrowserSync/browser-sync/issues/367/comments","events_url":"https://api.github.com/repos/BrowserSync/browser-sync/issues/367/events","html_url":"https://github.com/BrowserSync/browser-sync/issues/367","id":51880331,"number":367,"title":"XHR requests occasionally stop, browser-sync hangs","user":{"login":"noahgrant","id":1355779,"avatar_url":"https://avatars.githubusercontent.com/u/1355779?v=3","gravatar_id":"","url":"https://api.github.com/users/noahgrant","html_url":"https://github.com/noahgrant","followers_url":"https://api.github.com/users/noahgrant/followers","following_url":"https://api.github.com/users/noahgrant/following{/other_user}","gists_url":"https://api.github.com/users/noahgrant/gists{/gist_id}","starred_url":"https://api.github.com/users/noahgrant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noahgrant/subscriptions","organizations_url":"https://api.github.com/users/noahgrant/orgs","repos_url":"https://api.github.com/users/noahgrant/repos","events_url":"https://api.github.com/users/noahgrant/events{/privacy}","received_events_url":"https://api.github.com/users/noahgrant/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/BrowserSync/browser-sync/labels/mode:%20proxy","name":"mode: proxy","color":"0052cc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2014-12-13T07:50:11Z","updated_at":"2015-02-18T16:59:49Z","closed_at":null,"body":"I have a single-page app, served locally from browser-sync with several proxies (using [proxy-middleware](https://github.com/andrewrk/connect-proxy)).  (gulp is my task runner.)  Every so often, particularly if you refresh the page while a request is still processing, or click a tab or button to trigger an additional request before the previous one has finished, browser sync hangs—no new **proxied** XHR requests are made.  When you refresh the page, all local requests are served up correctly, ie javascript and css files (and their respective maps), but no XHR requests (all proxied requests for my app are ajax) are even pending in the devtools network tab; it's as though it's ignoring all middleware requests.  At first I though this might be a proxy-middleware bug, but I think if that were the case we'd still see a request begun.  \r\n\r\nOnce you restart the server, everything works as normal again.  The thing is, we're using browserify with watchify, and every time we have to launch a new gulp dev task, it takes ~20 seconds for the initial browserify build.  A temp solution might be to break the gulp tasks up into different terminals: one for the server/watcher tasks, and one for everything else (including browserify/watchify), so that if this happens, we can restart the server/watcher by themselves.  But ideally we can have them all in one command.\r\n\r\nAny insight on why this might be happening?  Is there more info I can offer?  \r\n\r\nThanks!!\r\n\r\n**EDIT:**  I guess after awhile (several minutes) of hanging, I do see some 500 errors from the proxied XHR requests, with the message: `(failed) net::ERR_EMPTY_RESPONSE`. Until then, manually typing in $.get() into the console queues the request and leaves it in a pending state."},"comment":{"url":"https://api.github.com/repos/BrowserSync/browser-sync/issues/comments/74901616","html_url":"https://github.com/BrowserSync/browser-sync/issues/367#issuecomment-74901616","issue_url":"https://api.github.com/repos/BrowserSync/browser-sync/issues/367","id":74901616,"user":{"login":"noahgrant","id":1355779,"avatar_url":"https://avatars.githubusercontent.com/u/1355779?v=3","gravatar_id":"","url":"https://api.github.com/users/noahgrant","html_url":"https://github.com/noahgrant","followers_url":"https://api.github.com/users/noahgrant/followers","following_url":"https://api.github.com/users/noahgrant/following{/other_user}","gists_url":"https://api.github.com/users/noahgrant/gists{/gist_id}","starred_url":"https://api.github.com/users/noahgrant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noahgrant/subscriptions","organizations_url":"https://api.github.com/users/noahgrant/orgs","repos_url":"https://api.github.com/users/noahgrant/repos","events_url":"https://api.github.com/users/noahgrant/events{/privacy}","received_events_url":"https://api.github.com/users/noahgrant/received_events","type":"User","site_admin":false},"created_at":"2015-02-18T16:59:49Z","updated_at":"2015-02-18T16:59:49Z","body":"thanks, Shane--I do still see it, but I'm no longer sure that it's a browser-sync issue, since multiple people are reporting it on [this connect-proxy issue](https://github.com/andrewrk/connect-proxy/issues/25)."}}