<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>IMHO I would 1st verify that you are actually generating the same
      query (and the one your expect) with wireshark (running the app in
      the emulator) and that what is happening is actually a time out.
      It seems really really really unlikely to me that you are running
      in to the rate limiting. <br>
    </p>
    <p><br>
    </p>
    <p>2x2km can naturally be a lot of data, in particular if you have
      largish relations in the area (even if you are not downloading all
      the members).</p>
    <p><br>
    </p>
    <p>Simon<br>
    </p>
    <br>
    <div class="moz-cite-prefix">Am 23.07.2018 um 18:19 schrieb Nick
      Whitelegg:<br>
    </div>
    <blockquote type="cite"
cite="mid:AM4PR07MB34250B3A4012778DC539BC4EA6560@AM4PR07MB3425.eurprd07.prod.outlook.com">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
      <div id="divtagdefaultwrapper"
style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;"
        dir="ltr">
        <p style="margin-top:0;margin-bottom:0"><br>
        </p>
        <p style="margin-top:0;margin-bottom:0">.... Digging a bit more,
          it looks like the API will reject a request if you make it
          relatively soon after the first; is this correct?</p>
        <p style="margin-top:0;margin-bottom:0">Is there a specific time
          limit between requests, i.e. you can only make requests every
          X seconds (if so, I can code this into my app)?</p>
        <p style="margin-top:0;margin-bottom:0"><br>
        </p>
        <p style="margin-top:0;margin-bottom:0">To make it absolutely
          clear - I am using the API for editing purposes. Specifically,
          the feature I'm testing at the moment allows you to download
          data from the API (2x2km square centred on current location),
          select ways and add/modify a designation tag.</p>
        <p style="margin-top:0;margin-bottom:0"><br>
        </p>
        <p style="margin-top:0;margin-bottom:0">Thanks,</p>
        <p style="margin-top:0;margin-bottom:0">Nick<br>
        </p>
        <p style="margin-top:0;margin-bottom:0"><br>
        </p>
        <div id="Signature">
          <div id="divtagdefaultwrapper" dir="ltr" style="color: rgb(0,
            0, 0); font-family: Calibri, Arial, Helvetica, sans-serif,
            "EmojiFont", "Apple Color Emoji",
            "Segoe UI Emoji", NotoColorEmoji, "Segoe UI
            Symbol", "Android Emoji", EmojiSymbols;
            font-size: 12pt;">
            <br>
          </div>
        </div>
      </div>
      <hr style="display:inline-block;width:98%" tabindex="-1">
      <div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt"
          face="Calibri, sans-serif" color="#000000"><b>From:</b> Nick
          Whitelegg <a class="moz-txt-link-rfc2396E" href="mailto:nick.whitelegg@solent.ac.uk"><nick.whitelegg@solent.ac.uk></a><br>
          <b>Sent:</b> 23 July 2018 16:50:14<br>
          <b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:dev@openstreetmap.org">dev@openstreetmap.org</a><br>
          <b>Subject:</b> [OSM-dev] Difficulty fetching data from API in
          own app, but not browser</font>
        <div> </div>
      </div>
      <meta content="text/html; charset=iso-8859-1">
      <style type="text/css" style="display:none">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
      <div dir="ltr">
        <div id="x_divtagdefaultwrapper" dir="ltr"
          style="font-size:12pt; color:#000000;
          font-family:Calibri,Helvetica,sans-serif">
          <p style="margin-top:0; margin-bottom:0"><br>
          </p>
          <p style="margin-top:0; margin-bottom:0">Hi,</p>
          <p style="margin-top:0; margin-bottom:0"><br>
            Currently experiencing some inconsistent behaviour with the
            API in which fetching via the browser gives a response,</p>
          <p style="margin-top:0; margin-bottom:0">but my own app
            ('MapThePaths', part of a project intended to help map
            footpaths and edit designation tags in the UK) frequently
            hangs waiting for a response.</p>
          <p style="margin-top:0; margin-bottom:0"><br>
          </p>
          <p style="margin-top:0; margin-bottom:0">MapThePaths uses the
            osmapi (Tobias Zwick) to fetch data.</p>
          <p style="margin-top:0; margin-bottom:0"><br>
          </p>
          <p style="margin-top:0; margin-bottom:0">Is there any reason
            currently why the API might be responding to standard web
            browsers but not custom apps?</p>
          <p style="margin-top:0; margin-bottom:0"><br>
          </p>
          <p style="margin-top:0; margin-bottom:0">FWIW my app should be
            reporting itself as "MapThePaths Android app" and I have
            just (around 16:35-16:40 UK time) made three unsuccessful
            requests with the bbox:
            <span> -0.7295872761598865,51.09355911139382,-0.7005316007485753,51.11122494429744.</span></p>
          <p style="margin-top:0; margin-bottom:0"><span><br>
            </span></p>
          <p style="margin-top:0; margin-bottom:0"><span>Sometimes,
              however, my app is retrieving data from OSM successfully
              (perhaps 60-70% of the time).</span></p>
          <p style="margin-top:0; margin-bottom:0"><span>No exception is
              thrown - just looks like a timeout.</span></p>
          <p style="margin-top:0; margin-bottom:0"><span><br>
            </span></p>
          <p style="margin-top:0; margin-bottom:0"><span>I also observed
              similar behaviour 'in the field' yesterday afternoon when
              I was using the app in the countryside. The app could talk
              to my own API on mapthepaths.org.uk successfully but could
              not communicate with the OSM API.</span></p>
          <p style="margin-top:0; margin-bottom:0"><span><br>
            </span></p>
          <p style="margin-top:0; margin-bottom:0"><span>Is this simply
              related to the issues with the OSM API at the moment
              related to moving to another server?<br>
            </span></p>
          <p style="margin-top:0; margin-bottom:0"><span><br>
            </span></p>
          <p style="margin-top:0; margin-bottom:0"><span>Thanks,</span></p>
          <p style="margin-top:0; margin-bottom:0"><span>Nick<br>
            </span></p>
          <p style="margin-top:0; margin-bottom:0"><br>
          </p>
          <div id="x_Signature">
            <style type="text/css" style="display:none">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
            <div id="x_divtagdefaultwrapper" dir="ltr"
              style="color:rgb(0,0,0);
              font-family:Calibri,Arial,Helvetica,sans-serif;
              font-size:12pt">
              <div style="margin:0px"><font size="2"
                  face="Calibri,sans-serif"><span style="font-size:11pt"><font
                      size="1" face="Trebuchet MS,sans-serif"><span
                        style="font-size:8pt"><strong>Nick Whitelegg</strong></span>
                    </font></span></font></div>
              <div style="margin:0px"><font size="2"
                  face="Calibri,sans-serif"><span style="font-size:11pt"><font
                      size="1" face="Trebuchet MS,sans-serif"
                      color="red"><span style="font-size:8pt"><strong><font
                            color="#000000">Senior Lecturer in Computing
                            (Internet)</font></strong> </span>
                    </font><font size="1" face="Trebuchet MS,sans-serif"
                      color="red"><span style="font-size:8pt"><b>|</b></span>
                    </font><font size="1" face="Trebuchet MS,sans-serif"
                      color="black"><span style="font-size:8pt">School
                        of Media Arts and Technology</span></font></span>
                </font></div>
              <div style="margin:0px"><font size="2"
                  face="Calibri,sans-serif"><span style="font-size:11pt"><font
                      size="1" face="Trebuchet MS,sans-serif"
                      color="black"><span style="font-size:8pt">Southampton
                        Solent University<font size="1" face="Trebuchet
                          MS,sans-serif" color="red"><span
                            style="font-size:8pt"> </span>
                        </font><font size="1" face="Trebuchet
                          MS,sans-serif" color="red"><span
                            style="font-size:8pt"><b>|</b></span>
                        </font><font size="1" face="Trebuchet
                          MS,sans-serif" color="red"><span
                            style="font-size:8pt"></span></font>RM424</span>
                    </font><font size="1" face="Trebuchet MS,sans-serif"
                      color="red"><span style="font-size:8pt"></span></font><font
                      size="1" face="Trebuchet MS,sans-serif"
                      color="red"><span style="font-size:8pt"><b>|</b></span>
                    </font><font size="1" face="Trebuchet MS,sans-serif"
                      color="red"><span style="font-size:8pt"></span></font><font
                      size="1" face="Trebuchet MS,sans-serif"
                      color="black"><span style="font-size:8pt">East
                        Park Terrace</span>
                    </font><font size="1" face="Trebuchet MS,sans-serif"
                      color="red"><span style="font-size:8pt"></span></font><font
                      size="1" face="Trebuchet MS,sans-serif"
                      color="red"><span style="font-size:8pt"><b>|</b></span>
                    </font><font size="1" face="Trebuchet MS,sans-serif"
                      color="black"><span style="font-size:8pt">Southampton
                        SO14 0YN</span></font>
                  </span></font></div>
              <div style="margin:0px"><font size="2"
                  face="Calibri,sans-serif"><span style="font-size:11pt"><font
                      size="1" face="Trebuchet MS,sans-serif"
                      color="black"><span style="font-size:8pt">T: 023
                        8201 3075
                      </span></font><font size="1" face="Trebuchet
                      MS,sans-serif" color="red"><span
                        style="font-size:8pt"><b>|</b></span></font><font
                      size="1" face="Trebuchet MS,sans-serif"
                      color="red"><span style="font-size:8pt">
                      </span></font><font size="1" face="Trebuchet
                      MS,sans-serif" color="black"><span
                        style="font-size:8pt">E:
                        <a href="mailto:nick.whitelegg@solent.ac.uk"
                          target="_blank" id="LPNoLP"
                          moz-do-not-send="true">nick.whitelegg@solent.ac.uk</a></span></font><font
                      size="1" face="Trebuchet MS,sans-serif"
                      color="black"><span style="font-size:8pt">
                      </span></font><font size="1" face="Trebuchet
                      MS,sans-serif" color="red"><span
                        style="font-size:8pt"><b>|</b></span></font><font
                      size="1" face="Trebuchet MS,sans-serif"
                      color="black"><span style="font-size:8pt"> W:
                      </span></font><a href="http://www.solent.ac.uk/"
                      target="_blank" id="LPNoLP" moz-do-not-send="true"><font
                        size="1" face="Trebuchet MS,sans-serif"><span
                          style="font-size:8pt">solent.ac.uk</span></font></a><font
                      size="1" face="Trebuchet MS,sans-serif"
                      color="black"><span style="font-size:8pt">
                      </span></font></span></font></div>
              <div style="margin:0px"><font size="2"
                  face="Calibri,sans-serif"><span style="font-size:11pt"><br>
                  </span></font></div>
              <div style="margin:0px"><font size="2"
                  face="Calibri,sans-serif"><span style="font-size:11pt"><a
href="http://www.solent.ac.uk/disclaimer/disclaimer.aspx"
                      target="_blank" id="LPNoLP" moz-do-not-send="true"><font
                        size="1" face="Trebuchet MS,sans-serif"><span
                          style="font-size:8pt">Disclaimer</span></font></a></span></font><br>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:dev@openstreetmap.org">dev@openstreetmap.org</a>
<a class="moz-txt-link-freetext" href="https://lists.openstreetmap.org/listinfo/dev">https://lists.openstreetmap.org/listinfo/dev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>