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

https://skyhook.glitch.me/ timeout #55

Closed
xergio opened this issue Oct 25, 2017 · 8 comments
Closed

https://skyhook.glitch.me/ timeout #55

xergio opened this issue Oct 25, 2017 · 8 comments

Comments

@xergio
Copy link

xergio commented Oct 25, 2017

Hi. Bitbucket is reporting timeouts when they are pushing commits over your gateway. Is everything ok? Should I install my own gateway instead? Thank you.

@dscalzi
Copy link
Collaborator

dscalzi commented Oct 25, 2017

The site is offline, not sure why. Will need @Jawnnypoo to check it out. Unsure if it's something internal crashing the site or if it is an issue with glitch.me.

@Jawnnypoo
Copy link
Member

@dscalzi I think what is happening as far as I can tell is that if skyhook encounters an uncaught exception, it stops running, and then we start getting the 504 gateway errors, presumably because Glitch.com is attempting to direct traffic our way, and the server has ceased running, so it is 504ing. Do you know if there is a good solution to this? Presumably we could try to eliminate all errors, but it could happen for a number of reasons, and it would be hard to catch everything. Any ideas?

@dscalzi
Copy link
Collaborator

dscalzi commented Oct 25, 2017

Hmm, 19de4ca should have fixed this issue for provider exceptions as they are caught and the program should continue as normal. Is the specific issue originating from a provider or from the server.js?

It's unlikely that catching an issue halts the program, but I'll check out that possibility anyway.

Edit: yea the try catch for the provider parse does not seem to halt the program. I just put in an artifical error onto my local copy in one of the providers and attempted to recieve a payload. The error was caught and printed to the console without affecting anything. Subsequent requests were still accepted and parsed fine.

Is this issue coming from outside a provider then?

@Jawnnypoo
Copy link
Member

#57 seems to be missing that try/catch, since it is having errors in the body parsing itself. I am not entirely sure that that is the issue causing the site to become unresponsive though. It could also be that we are attempting to parse a webhook and suspending things and never returning, or something more along those lines. Maybe we can add some timeouts on parsing the payloads in case that is what is happening?

@dscalzi
Copy link
Collaborator

dscalzi commented Oct 25, 2017

That could be the case, does it seem like there's an infinite loop somewhere halting everything?

@Jawnnypoo
Copy link
Member

Well, we are calling await here https://github.com/Commit451/skyhook/blob/master/server.js#L82
which could have the chance of getting stuck somewhere. Not sure if that would cause the server to become unresponsive though, because I think node is built in a way where it would just continue to service requests.

Nonetheless, I am going to add an uptime monitor to the site so that I can restart it if it goes down as a temporary solution.

@dscalzi
Copy link
Collaborator

dscalzi commented Oct 25, 2017

It's probably also best to log out what provider + function is being called each time we get a request for the next week or so at least. This is just so that we can see what was sent immediately before it crashed. With no logging we are largely in the dark.

@Jawnnypoo
Copy link
Member

Agreed 👍 Going to close this out then while we monitor, since the site is back

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