-
Notifications
You must be signed in to change notification settings - Fork 639
Closed
Labels
coretype: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
I've been getting this response in both production and locally (using the production datastore):
{ [Error]
code: 503,
metadata: Metadata { _internal_repr: {} },
response: '' }
The error is thrown from here - https://github.com/grpc/grpc/blob/release-0_13_1/src/node/src/client.js#L411
Steps to reproduce:
- Make a http request "/" that hits datastore
- Wait a few minutes and don't make an http request that hits the datastore
- Make a http request "/" that hits datastore
Expect: Datastore to return results
Actual: 503 unavailable
- Immediately make a http request "/" that hits datastore
The datastore will work and continue to work for another few minutes.
I've deployed the bookstore sample app and it seems to have the same behavior saying "Something broke!".
Here is the code:
var gcloud = require('gcloud')({
projectId: 'app'
});
var datastore = gcloud.datastore();
var app = express();
app.disable('etag');
app.set('trust proxy', true);
app.get('/', function(req, res, next) {
var query = datastore.createQuery('Post').filter("Status", "staged");
datastore.runQuery(query, function(err, posts) {
if (err) {
console.log(err.message)
console.log(err.code)
console.log(err.metadata)
next(err)
} else {
res.status(200).send("Posts staged = " + posts.length)
}
})
});
I'm using the default app credentials and Flexible VMs. Let me know if there is any other info I could provide.
Metadata
Metadata
Assignees
Labels
coretype: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.