+ Reply to Thread
Results 1 to 5 of 5

Thread: Etags and Intermittent QueryTask Server Errors

  1. #1
    Douglas Hall
    Join Date
    Jun 2012
    Posts
    17
    Points
    1
    Answers Provided
    0


    0

    Default Etags and Intermittent QueryTask Server Errors

    Using jsapi 3.2 and server 10.11, running a simple intersection queryTask on a polygon AGSDynamicService, see below, and it fails half of the time with HTTP 200 and response payload {"error":{"code":400,"message":"Unable to complete operation.","details":[]}}

    Has anyone been having a similar problem? Do these Etags make sense? I'm keying in on the Etag strangeness because it seems like I should be getting 304 not modifieds when Etags are available or at least the whole response again -- not errors.

    Code:
    var query = new esri.tasks.Query(),
        queryTask = new esri.tasks.QueryTask(SERVICE_PATH_OPERATIONAL_MAP);
    
    query.geometry = mapPoint;
    query.outFields = ["DAC", "MHI", "GEOID10"];
    queryTask.execute(query, function (res) {
        //do something
    }, function (err) {
        alert(err.message);
    });
    Here's the series of events:
    ----------------------------
    1. Clear browser cache
    2. a. Send request with query
    b. Get 200 response with GOOD answer and Etag 1346882992
    3. a. Send request with same query and If-None-Match 1346882992
    b. Get 200 response with ERROR answer and Etag bdb51271
    4. a. Send request with same query and If-None-Match bdb51271
    b. Get 200 response with GOOD answer and Etag 1346882992
    5. a. Send request with same query and If-None-Match 1346882992
    b. Get 200 response with ERROR answer and Etag bdb51271
    6. a. Send request with same query and If-None-Match bdb51271
    b. Get 200 response with GOOD answer and Etag 1346882992
    7. a. Send request with same query and If-None-Match 1346882992
    b. Get 200 response with ERROR answer and Etag bdb51271

    Using wikipedia for how Etags should generally work? http://en.wikipedia.org/wiki/HTTP_ETag

    Thanks for your help!

  2. #2
    Derek Swingley

    Join Date
    May 2010
    Posts
    1,859
    Points
    892
    Answers Provided
    165


    0

    Default Re: Etags and Intermittent QueryTask Server Errors

    I've seen something similar once previously but with an async GP service instead of a query task. I don't currently have a fix or a good work around.

    Is there a public URL for your service?
    Last edited by swingley; 12-06-2012 at 07:31 AM.
    --
    @derekswingley | ArcGIS API for JavaScript Team Member.

    If you're posting a code or html sample, please wrap it in code tags.

  3. #3
    Douglas Hall
    Join Date
    Jun 2012
    Posts
    17
    Points
    1
    Answers Provided
    0


    0

    Default Re: Etags and Intermittent QueryTask Server Errors

    No it's not a public service... maybe I'll try and get it through the firewall and repost the question.

  4. #4
    Derek Swingley

    Join Date
    May 2010
    Posts
    1,859
    Points
    892
    Answers Provided
    165


    1

    Default Re: Etags and Intermittent QueryTask Server Errors

    This looks like it's NIM086349 which was introduced with service pack 1 for ArcGIS Server 10.1. Can you open a call with support and request to be added to this bug?
    --
    @derekswingley | ArcGIS API for JavaScript Team Member.

    If you're posting a code or html sample, please wrap it in code tags.

  5. #5
    Zach Liu
    Join Date
    Aug 2013
    Posts
    97
    Points
    39
    Answers Provided
    8


    0

    Default Re: Etags and Intermittent QueryTask Server Errors

    I hit the same issue and I found this thread,

    the request is like:
    success,
    fail,
    success,
    fail,
    ......

    I am using this work around:

    because queryTask.execute() accept the third parameter as err handling function, I insert the function to call queryTask.execute() again in it and it works almost all the time.

    Any other ideas?

+ Reply to Thread

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts