{"action":"created","issue":{"url":"https://api.github.com/repos/polygon-city/building-database-kml-importer/issues/1","labels_url":"https://api.github.com/repos/polygon-city/building-database-kml-importer/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/polygon-city/building-database-kml-importer/issues/1/comments","events_url":"https://api.github.com/repos/polygon-city/building-database-kml-importer/issues/1/events","html_url":"https://github.com/polygon-city/building-database-kml-importer/issues/1","id":62051966,"number":1,"title":"Socket hang up error","user":{"login":"robhawkes","id":22612,"avatar_url":"https://avatars.githubusercontent.com/u/22612?v=3","gravatar_id":"","url":"https://api.github.com/users/robhawkes","html_url":"https://github.com/robhawkes","followers_url":"https://api.github.com/users/robhawkes/followers","following_url":"https://api.github.com/users/robhawkes/following{/other_user}","gists_url":"https://api.github.com/users/robhawkes/gists{/gist_id}","starred_url":"https://api.github.com/users/robhawkes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robhawkes/subscriptions","organizations_url":"https://api.github.com/users/robhawkes/orgs","repos_url":"https://api.github.com/users/robhawkes/repos","events_url":"https://api.github.com/users/robhawkes/events{/privacy}","received_events_url":"https://api.github.com/users/robhawkes/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/polygon-city/building-database-kml-importer/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-16T11:37:21Z","updated_at":"2015-03-23T14:46:41Z","closed_at":null,"body":"I'm seeing what seems to be unpredictable socket hang up errors when processing batches of large KML files.\r\n\r\n```\r\nError: socket hang up\r\n    at createHangUpError (http.js:1477:15)\r\n    at Socket.socketOnEnd [as onend] (http.js:1573:23)\r\n    at Socket.g (events.js:180:16)\r\n    at Socket.emit (events.js:117:20)\r\n    at _stream_readable.js:944:16\r\n    at process._tickCallback (node.js:442:13)\r\n```\r\n\r\nThere doesn't seem to be a consistent trigger, as when running the same dataset multiple times I saw it occur after 55 buildings the first time and after 200 the second.\r\n\r\nFrom what I can see, it may be caused by:\r\n\r\n- My shoddy Internet connection causing a timeout to occur before a building has finished uploading\r\n- My shoddy Internet connection causing the upload to drop midway and cause an unhandled error (though there is no error on the server)\r\n- The server not closing the connection under some circumstance\r\n- The client not handling the server response properly under some circumstance\r\n\r\nI'm not sure which it is yet, if any of them, though my money is on the first option."},"comment":{"url":"https://api.github.com/repos/polygon-city/building-database-kml-importer/issues/comments/85031456","html_url":"https://github.com/polygon-city/building-database-kml-importer/issues/1#issuecomment-85031456","issue_url":"https://api.github.com/repos/polygon-city/building-database-kml-importer/issues/1","id":85031456,"user":{"login":"robhawkes","id":22612,"avatar_url":"https://avatars.githubusercontent.com/u/22612?v=3","gravatar_id":"","url":"https://api.github.com/users/robhawkes","html_url":"https://github.com/robhawkes","followers_url":"https://api.github.com/users/robhawkes/followers","following_url":"https://api.github.com/users/robhawkes/following{/other_user}","gists_url":"https://api.github.com/users/robhawkes/gists{/gist_id}","starred_url":"https://api.github.com/users/robhawkes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robhawkes/subscriptions","organizations_url":"https://api.github.com/users/robhawkes/orgs","repos_url":"https://api.github.com/users/robhawkes/repos","events_url":"https://api.github.com/users/robhawkes/events{/privacy}","received_events_url":"https://api.github.com/users/robhawkes/received_events","type":"User","site_admin":false},"created_at":"2015-03-23T14:46:41Z","updated_at":"2015-03-23T14:46:41Z","body":"While the socket errors are still occurring periodically, the batch functionality added in #2 has meant that it's possible to resume the addition of buildings and pick up where you left of. I also noticed that the socket hangup can occur even for successful building uploads, so I'm still not entirely sure what could be causing it yet."}}