Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, a web toolkit designed to help citizens, conservation practitioners, municipal decision-makers, researchers, educators, and students advance knowledge and stewardship of fresh water. New to EnviroDIY? Start here

Response code 504 from data.envirodiy.org

Home Forums Mayfly Data Logger Response code 504 from data.envirodiy.org

Viewing 8 reply threads
  • Author
    Posts
    • #13736
      Matt Barney
      Participant

      Today I’ve been intermittently getting a 504 HTTP response when POSTing to the data portal:

      This is from a Mayfly on my desk, using an XBee3 LTE and connected to the serial monitor in PlatformIO/VSCode. So far I’ve been unable to generate any error when posting the same messages via Postman from my laptop; it always seems to return a 201, and the data correctly shows up on MMW.

    • #13738
      Sara Damiano
      Moderator

      Huh.  I’m not aware of any particular reason today would be worse than any other day.  There was an update to MonitorMW released on Thursday (1/23), but it mostly dealt with Leaf Pack data and shouldn’t be affecting anything today.

    • #13739
      neilh
      Participant

      I’m seeing it as well. It starts of as 201, and then after 10~2 POST starts printing 504. It has been happening from late last week – but is being recorded on MMW. I wasn’t monitoring anything early last week,

    • #13742
      Matt Barney
      Participant

      In my case, any time I get a 504 response, the corresponding data do not show up on MMW. Pasting the same JSON message body into Postman and sending it always succeeds with a 201.

    • #13744
      Sara Damiano
      Moderator

      @aufdenkampe – any thoughts?

      Postman automatically tacks on more standard http headers than I include in the post from ModularSensors.  I wonder if one of them is making a difference. In PostMan after making a request you can click the “Headers” tab and you’ll see 8 or 9 “temporary” headers that it used in addition to your token header.  ModularSensors only includes host, content-type, and content-length (and, of course, token).  If you open the EnviroDIYPublisher.cpp you can find and re-activate lines to add the cache control and connection headers (a few places needed: lines 24-25, 163-164, and 229-233).  Maybe one of them will make a difference.  If neither of those, I suppose it could be one of the accept headers, which I’ve never added.

    • #13745

      Hmm. I wonder if it is somehow connected to our last release on Thu. Jan. 23. As Sara mentioned, we didn’t touch the code related to the HTTP post request, but at that time we did make some changes to our virtual machine host OS and our router.

      Does it make a difference if you post to monitormywatershed.org, which is now our primary hostname, rather than data.envirodiy.org? I wonder if the rerouting might contribute.

    • #13746
      Matt Barney
      Participant

      Looks like it will still happen when posting to monitormywatershed.org. It’s intermittent, as before. Log file attached.

      To do this test, I modified line 21 in EnviroDIYPublisher.cpp as follows:

      Matt

      Attachments:
      1. MMW.txt
    • #13760
      Matt Barney
      Participant

      I just found issue #303 on the ODM2DataSharingPortal site that may be related to my issue: I have a blank UUID in my example request, posted above. I’ll retest and report back.

    • #13761
      Matt Barney
      Participant

      OK, looks like I still get 504 errors intermittently, even when all UUIDs are specified properly.

Viewing 8 reply threads

You must be logged in to reply to this topic.