AnsweredAssumed Answered

MSE API Large Query Question

Question asked by Barry.jon1 on Mar 30, 2016
Latest reply on Apr 6, 2016 by Barry.jon1

Trying to gather all client history information so we can load it into mongoDB and do some crunching on it.I can run various queries successfully(using postman) but when I run the /location/history/clients query without an id I get a 502 error. Usually with other queries when they are malformed you just get a blank page. The query without any id runs for a couple of minutes and returns the following error(basically a 502). I suspect that the time to get all the data( a location history count returns a count of 11.9 million) is tripping a timeout on the web server - or too much data perhaps.  Just wondering if there is anything on my end I can do before appealing to the web server admin for help.Note: I am a database admin and any web development work is about 10 to 15 years in my past! I did a quick check through my Chrome browser settings and didn't see anything for a timeout setting on my end.

 

The query is of the form

 

https://XXX.XXX.XXX.XX/api/contextaware/v1/location/history/clients

 

The results are:

 

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">

<html>

    <head>

        <title>502 Proxy Error</title>

    </head>

    <body>

        <h1>Proxy Error</h1>

        <p>The proxy server received an invalid

response from an upstream server.

            <br />

The proxy server could not handle the request

            <em>

                <a href="/api/contextaware/v1/location/history/clients">GET /api/contextaware/v1/location/history/clients</a>

            </em>.

            <p>

Reason:

                <strong>Error reading from remote server</strong>

            </p>

        </p>

    </body>

</html>

Outcomes