"Loading…" ajax error?

Home Forums MapPress Support "Loading…" ajax error?

Tagged: ,

Viewing 15 posts - 1 through 15 (of 24 total)
  • Author
    Posts
  • #14726
    James Proctor
    Participant

    I’ve not had this happen before using WPEngine host: my mashup maps (e.g., here) usually show “Loading…” and don’t load successfully. Below is Chrome console output:

    POST http://ds.lclark.edu/jproctor/wp-admin/admin-ajax.php net::ERR_TIMED_OUT jquery.js?ver=1.11.0:4
    send jquery.js?ver=1.11.0:4
    n.extend.ajax jquery.js?ver=1.11.0:4
    mapp.Ajax mappress.min.js?ver=2.42.1:1
    ajaxQuery mappress.min.js?ver=2.42.1:1
    display mappress.min.js?ver=2.42.1:1
    (anonymous function) (index):84

    Sure appreciate insight on how to further diagnose; I see here that it could be a plugin conflict, which I could incrementally do, though of course most of our plugins are needed.

    Jim P.

    #14728
    James Proctor
    Participant

    …and now it seems to work fine. A support person ran a file permission fix for another error; not sure if these are connected.

    Will be back in touch if we reproduce the error.

    Jim P.

    #14757
    James Proctor
    Participant

    Nope, looks like it’s a random error, always the hardest to diagnose, but we definitely continue to experience it. It’s possible it’s a back-end cache issue on the WPEngine side, as the page noted above was excluded from their cache (by their admins…I have no control over this, vs. other caches I’ve worked with) and it consistently loads, though with all other pages (e.g., this one I just did to test, using exact same mashup code as the one above) it seems necessary that they are invoked via https:// (i.e., avoiding their cache) vs. desired http:// in order to load correctly.

    Thanks again for your input.

    Regards,

    Jim P.

    #14758
    Chris
    Keymaster

    Hi,

    It seems like the server is not responding to an AJAX request. I couldn’t reproduce the problem on that test page but if it’s intermittent maybe I just didn’t catch it.

    I suggest checking both the PHP server logs and Apache logs. They should provide a clue about why the server isn’t answering. Unless it’s a connectivity problem, the only thing I can think of is an out of memory error (which would be in the PHP/Apache logs).

    To test for a connectivity issue, you can just call admin-ajax.php directly – if you don’t see “0” output then the server didn’t respond:
    http://ds.lclark.edu/jproctor/wp-admin/admin-ajax.php

    #14759
    James Proctor
    Participant

    Thanks; will forward your reply and be in touch.

    Jim P.

    #14826
    James Proctor
    Participant

    Okay, problem has continued with my host but intermittent. The support staff with my host report the following; could you please clarify? Sure appreciate..Jim P.

    I’m seeing that there are two requests for admin-ajax when both pages with maps are pulled up. The first request contains query arguments and completes successfully, sending up the data enclosed within lclark_adminajax_request.txt. The site returns the information included in the text file attached called lclark_adminajax_response.txt. This information is also available through your browser’s Developer Console when looking into the admin-ajax requests.

    The second admin-ajax request contains no query arguments, and gets back the “0” response that you’ve received. Going by the resource requests that the site makes at this time, this second admin-ajax request should be returning the map data.

    As this appears to be happening sporadically, we would need to find out what is normally included in that second request when the page is working as desired, or get in touch with the developer to have them investigate and see what their functionality requires from the original admin-ajax request that it might not be getting.

    Please do contact the developer to see what light can be shed on this issue. At this time, knowing what input or information the mapping functionality should be getting from that second request to admin-ajax will help to see whether the issue is with our platform, the code from the plugin or an external service that it’s reaching out to.

    #14829
    Chris
    Keymaster

    Hi,

    I think both requests completed successfully. The second request should just return “0”, not map data. It’s just a test to see if the server can be reached.

    Intermittent problems are tough to troubleshoot, but you should look at the Apache and PHP logs when the problem occurs. Have you done that yet?

    If you like, you can email me the log files the next time you see a glitch.

    #14844
    James Proctor
    Participant

    Okay, here’s more info (and there are two related files I can send you separately as needed). The support staff just sent me the following:

    I’ve taken a look at the output for the requests that go to /wp-admin/admin-ajax.php and it appears that there’s a difference in what we receive when the site’s working, compared to when it’s broken. I’ve attached a couple of text files with old (broken) and new (working) responses, with line breaks at each opening curled bracket.

    If you put the two files in a diff tool, you’ll see that there are a handful of lines that differ, due to references such as “mapp0.getPoi(4).zoomIn()” being truncated to “.getPoi(4).zoomIn()”.

    Let me know if this helps the developer track down where the issue may lie.

    #14846
    Chris
    Keymaster

    Ok, send them over. Have you checked the PHP and Apache logs yet?

    #14848
    James Proctor
    Participant

    I don’t know how to upload attachments on this forum, so have placed them on a server here and here. I’ll convey need to check PHP and Apache logs to the support staff.

    Many thanks,

    Jim P.

    #14854
    Chris
    Keymaster

    Hi,

    Looking at the two files, it seems like the map ‘name’ parameter isn’t being used in the one that fails. The parameter is set directly from $_POST and I see it in the request, so I don’t know why it wouldn’t always make it to the PHP code. Also, the opening “{” is missing in the failing response, which would make it invalid JSON – is that a typo or was it really missing?

    I assume both requests are from the same page, so I don’t know why the data would be invalid in one request but not the other.

    The logs may give some clues.

    The plugin uses output buffering, so it’s possible there’s some issue there. I can give you a version of the plugin that will write some debugging info to the error log and remove the buffering, which may help. You’ll need to use the contact form to email me directly.

    #14856
    James Proctor
    Participant

    Okay, many thanks; will forward to support folks and may ask you for that modified plugin if they need it…Cheers, Jim

    #14863
    James Proctor
    Participant

    I’m assuming you received my request a few days ago via contact form for the debugging version of the plugin; do let me know if issues, and thanks again for your assistance.

    #14872
    Chris
    Keymaster

    No, I didn’t receive anything from you. Please resend using the contact form or email me directly so I can reply with the debug version.

    #14875
    James Proctor
    Participant

    Okay, I’ve just resent via your contact form…thanks, Jim

Viewing 15 posts - 1 through 15 (of 24 total)
  • You must be logged in to reply to this topic.