Web interface AJAX timeouts



  • I am getting a significant number of web interface disconnects. It was intermittent while tooling around in files, but is happening repeatedly while printing. I'm printing a Benchy and am 10 minutes in and I've had three AJAX timeouts. Nope, four, another just happened while typing. The first was while probing at the start of the print. Then they've been every few minutes after that. The print continues without issue, but sometimes I have to wait a little bit (10-20 sec? haven't timed it) before it will successfully reconnect. And there's timeout #5 during minute 13. And there's #6 at minute 16. So this is a pretty consistent "every 2-4 minutes" thing.

    I have my AJAX timeout set to 20 seconds. That seems pretty long to me. Should I try making it longer?

    Are there any diagnostics I can do to help troubleshoot this?

    On that note, is there any way to post screenshots on this forum without having to upload them somewhere else first?

    M122 dump after 7 AJAX timeouts:

    [[language]]
    10:28:57 PM
    M122
    Diagnostics
    Used output buffers: 1 of 32 (5 max)
    Platform Diagnostics:
    Memory usage:
    Program static ram used: 13012
    Dynamic ram used: 57876
    Recycled dynamic ram: 2840
    Current stack ram used: 2736
    Maximum stack ram used: 7760
    Never used ram: 49584
    Last reset 00:19:28 ago, cause: software
    Error status: 0
    Bed probe heights: -0.034 -1.068 -0.589 0.149 0.554 0.314 -0.174 -0.324 0.405 0.178 0.208 -0.545 -0.049 0.000 0.000 0.000
    Free file entries: 9
    SD card interface speed: 20.0MBytes/sec
    SD card longest block write time: 8.8ms
    MCU temperature: min 45.1, current 48.9, max 52.8
    Supply voltage: min 24.0, current 24.3, max 24.7
    Slowest main loop (seconds): 0.088455; fastest: 0.000000
    Move Diagnostics:
    MaxReps: 9, StepErrors: 0\. Underruns: 32
    Heat Diagnostics:
    Bed heater = 0, chamber heater = -1
    Heater 0 is on, I-accum = 0.0
    Heater 1 is on, I-accum = 141.9
    GCodes Diagnostics:
    Move available? yes
    Stack pointer: 0 of 5
    macro is idle
    http is ready with "M122"
    telnet is idle
    serial is idle
    aux is idle
    file is idle
    Network Diagnostics:
    WiFiServer is running
    SPI underruns 0, overruns 0
    Webserver Diagnostics:
    HTTP sessions: 1 of 8
    
    


  • I'm getting them too, but not while doing anything (not have it in printer yet, haven't had time). I got the gcode output log from when mine dced but DC said it just looked like a regular disconnect request. My thread I have opened is about the same issue I think, the latest dc I've had the error message just said it timed out.



  • Happening to me as well. I get a stretch of a bunch of them in a row, and then nothing for a while. Had a print finish last night, and no timeout since then, but last night there were many.


  • administrators

    As these disconnects are so sporadic, my guess is that they may be caused by temporary loss of the wireless connection. DWC doesn't allow for that, so it's on my list to allow at least one retry after a timeout.



  • Same here, about one timeout related disconnect every 15 minutes. AJAX timeout set to 20s.



  • Haven't had any timeouts yet tonight. Currently 36 minutes into a print.



  • It's really weird that some nights I get the timeouts constantly, and some nights I make it 4+ hours without one.



  • I'm seeing the same behavior here.



  • Not sure what just happened, but I had an AJAX timeout in the middle of uploading a file, and the web interface lost the ability to upload files until I reloaded the interface page (in Chrome). When I clicked Upload & Print, it would open the file selection dialog, and then upon selecting the file nothing would happen. Persisted through power cycling the printer. Reloading the web page (which took ~20+ seconds) fixed it.



  • This has just happened to me as well, except I was unable to reload the web interface without power cycling the duet



  • The AJAX errors are really my only complaint at this point, everything else has been smooth sailing.



  • @RCarlyle:

    Reloading the web page (which took ~20+ seconds) fixed it.

    Not sure that I'm right, but it seems like such long times with page reload caused by this: https://www.duet3d.com/forum/thread.php?pid=402#p402



  • I'm printing now but I keep getting timeouts. I got two in a row after restarting the same print (had to power cycle the printer both times) and then this one got a ways in before it timed out. The print is still going, but I need to reconnect to increase the temp by 5 degrees. Its been 25 minutes since the DC and I still can't connect.


  • administrators

    Nyl0cke, check out the resolution on this thread:
    https://www.duet3d.com/forum/thread.php?id=38&p=2

    It will be interesting to see what effect this has



  • Seems like this fix is only for static files (css/html/js) coming from Duet to browser. But not for dynamic ajax responses.



  • Yeah I'm also still getting a lot of errors. About the same amount, maybe more but its a small sample size so it might be coincidence.


  • administrators

    1. Those of you who are getting Ajax disconnects: is the Error Reason at the bottom of the box always given as timeout?

    2. If you ever find that you can't reconnect after a disconnect, please try the following if possible:

    A. Close the browser tab, open a new one and try to connect in that.

    B. If that doesn't work, use Pronterface or PanelDue to send M552 S0 followed by M552 S1 to restart the wifi module. Then try to connect.

    C. If that doesn't work, run M122 from Pronterface and see what the number of free buffers is.



  • Yes for me. I canceled the print I had going (had a mechanical problem I had to fix) and I updated the web server and now I can't keep connected for more than a couple minutes it seems. its been anywhere between 30 seconds to 8 minutes right now.

    I'll try what you said when it happens again



    1. It certainly is for me.

      • A. Connect from another browser instance (machine) works but is slow

    B. Hasn't been necessary yet and I have no paneldue on this machine

    C. Will try next time if I can't reconnect

    Seems to be worse after I went from wired-wifi connection to wifi-wifi after I moved my laptop. Upload speeds dropped to ~250k (even seen 30-40k on smallish files!).

    Hope you can find a fix for timeouts as well as speed.



  • Okay, If it disconnects I can not reconnect by opening a new tab and trying to connect. If I connect to the board via serial I can turn off the server and turn it back on and I can connect.

    I can leave it connected but I can't test while printing for a while, the mount I used for my hotend isn't working very well, the hotend is moving around in its mount (flying extruder) a good 3mm or so.

    I also tried reconnecting on a different computer to no avail.


Locked
 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.