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

handle a backend disconnect gracefully #1

Closed
missinglink opened this issue Sep 12, 2014 · 1 comment
Closed

handle a backend disconnect gracefully #1

missinglink opened this issue Sep 12, 2014 · 1 comment

Comments

@missinglink
Copy link
Member

Test what happens when the backend goes away and give an apologetic error to the consumer.

@missinglink
Copy link
Member Author

If all the backend connections go away it handles it pretty gracefully, this is what I got in testing:

$ curl -vvv "http://localhost:3100/suggest?input=hack&lat=51.5&lon=0"
* Hostname was NOT found in DNS cache
*   Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 3100 (#0)
> GET /suggest?input=hack&lat=51.5&lon=0 HTTP/1.1
> User-Agent: curl/7.35.0
> Host: localhost:3100
> Accept: */*
> 
< HTTP/1.1 500 Internal Server Error
< X-Powered-By: mapzen
< Charset: utf8
< Cache-Control: no-cache
* Server Pelias/0.0.0 is not blacklisted
< Server: Pelias/0.0.0
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Methods: GET
< Access-Control-Allow-Headers: X-Requested-With,content-type
< Access-Control-Allow-Credentials: true
< Content-Type: application/json; charset=utf-8
< Content-Length: 45
< ETag: W/"2d-18f70f62"
< Date: Fri, 03 Oct 2014 13:48:18 GMT
< Connection: keep-alive
< 
* Connection #0 to host localhost left intact
{"error":{"message":"No Living connections"}}

happy with this, closing ticket

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

1 participant