10000 HTTP v2 delete returns application error on success · Issue #721 · cayleygraph/cayley · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
HTTP v2 delete returns application error on success #721
Open
@steffansluis

Description

@steffansluis

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0