Open
Description
I'm doing the following:
- Select 1000 subjects matching a particular predicate and object using
g.V("object").In("<predicate>").Limit(1000).All()
- Map the result to quads in JSON
- POST the stringified JSON array and the correct content type as a body to
/api/v2/delete
on my Cayley host.
After 30 seconds, I get the following response (my Cayley instance is running on Heroku, hence the error page):
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8">
<title>Application Error</title>
<style media="screen">
html,body,iframe {
margin: 0;
padding: 0;
}
html,body {
height: 100%;
overflow: hidden;
}
iframe {
width: 100%;
height: 100%;
border: 0;
}
</style>
</head>
<body>
<iframe src="//www.herokucdn.com/error-pages/application-error.html"></iframe>
</body>
</html>
However, running g.Emit(g.V("object").In("<predicate>").Count())
confirms that indeed 1000 quads were deleted. I think what might be happening is that the request takes longer than 30 seconds (which is the Heroku timeout) causing it to be cut off by the Heroku router. However, Cayley continues processing the delete and as a result, the request has the intended effect but returns with a timeout error after 30 seconds. The request shouldn't take that long. I suspect something is not being closed properly causing every successful request to hang until the timeout.