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

Socket Hang Up error #13

Closed
corycaywood opened this issue Mar 16, 2017 · 1 comment
Closed

Socket Hang Up error #13

corycaywood opened this issue Mar 16, 2017 · 1 comment
Assignees
Labels
Milestone

Comments

@corycaywood
Copy link
Contributor

Need to investigate what causes this error:

Upload failed!
socket hang up
Error: socket hang up
   at createHangUpError (_http_client.js:302:15)
   at TLSSocket.socketOnEnd (_http_client.js:394:23)
   at emitNone (events.js:91:20)
   at TLSSocket.emit (events.js:186:7)
   at endReadableNT (_stream_readable.js:974:12)
   at _combinedTickCallback (internal/process/next_tick.js:74:11)
   at process._tickCallback (internal/process/next_tick.js:98:9)
@corycaywood
Copy link
Contributor Author

I haven't been able to reproduce the socket hang up error. However when running the tool on a repository with a large number of files, ZendeskClientWrapper will often need to retry uploads because it gets a 500 error from Zendesk.

The 500 errors seem to happen most often on the resource uploading step, when many connections are staying open at once. So I think it happens because of a limit by Zendesk's servers regarding the number of simultaneous connections. After some testing, I found that 500 errors seem to happen when more than 30 connections are made at once.

So I propose two things for this issue:

  1. Implement request throttling so that no more than 30 connections are made at once.
  2. Implement incremental "Retry After" times - each retry should wait an incrementally longer amount of time before retrying again:
  • 1st retry: 500ms
  • 2nd retry: 1000ms
  • 3rd retry: 2000ms
  • 4th retry: 4000ms
  • 5th retry: 8000ms

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

No branches or pull requests

1 participant