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

Proxy crashes after multiple errors #14

Open
codybrouwers opened this issue Jun 27, 2018 · 1 comment
Open

Proxy crashes after multiple errors #14

codybrouwers opened this issue Jun 27, 2018 · 1 comment

Comments

@codybrouwers
Copy link

I setup this gem for our production GraphQL API today and within an hour our API stopped responding and I saw this error in the logs from the proxy:

time="2018-06-27T17:42:25Z" 
level=warning 
msg="Received unsupported Content-Type from origin GraphQL server. This often occurs when a GraphQL server throws an error and sends that error as `text/plain` instead of embedding it within a GraphQL error. Check to make sure any errors encountered during resolver execution and middleware processing are translated into the GraphQL errors field. This could also be caused by an inaccurate Content-Type header." 
content-type=text/html 
response-body="{\"message\": \"Something went wrong. We've already been notified of the problem and are working to fix it. We apologise for the inconvenience.\"}"

That error repeated 15 times before I see this in the log
Couldn't cleanly terminate the Apollo Engine Proxy in 3 seconds!

After that point, the proxy completely died and all API requests went ignored.

So from the error message I'm wondering if I need to change the format of the 500.html page to be JSON instead of a text/html format and if that would fix the issue? Also I'm wondering why the proxy doesn't try to restart itself after dying.

Thanks in advance for the help!

Cody

@beagleknight
Copy link

This happened to me as well and I decided to deploy the apollo engine proxy as a separate service in our kubernetes cluster. Here you have the instructions to deploy the proxy as a separate container.

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

2 participants