<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Intermittent 504 gateway timeouts with hosted feature layers in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/intermittent-504-gateway-timeouts-with-hosted/m-p/1143363#M44339</link>
    <description>&lt;P&gt;I am getting Error 504 on feature layers hosted on AGOL as well. Based on some testing I've done it seems to be a problem with AGOL. I have created a small test that demonstrates the issue:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;gt;
&amp;lt;head&amp;gt;
    &amp;lt;meta charset="UTF-8"&amp;gt;
    &amp;lt;meta http-equiv="X-UA-Compatible" content="IE=edge"&amp;gt;
    &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&amp;gt;
    &amp;lt;title&amp;gt;Document&amp;lt;/title&amp;gt;


    &amp;lt;script src="https://unpkg.com/@esri/arcgis-rest-request@3.4.3/dist/umd/request.umd.min.js"&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script src="https://unpkg.com/@esri/arcgis-rest-feature-layer@3.4.3/dist/umd/feature-layer.umd.min.js"&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script src="https://unpkg.com/@esri/arcgis-rest-auth@3.4.3/dist/umd/auth.umd.min.js"&amp;gt;&amp;lt;/script&amp;gt;

    &amp;lt;script&amp;gt;
        function getTimeDelta(start, stop){
            var timeDelta = parseInt(stop - start);
            var days = parseInt(timeDelta / 86400000);
            var daysRem = timeDelta - (days * 86400000);
            var hours = parseInt(daysRem / 3600000);
            var hoursRem = daysRem - (hours * 3600000);
            var minutes = parseInt(hoursRem / 60000);
            var minutesRem = hoursRem - (minutes * 60000);
            var seconds = parseInt(minutesRem / 1000);
            var milliseconds = minutesRem - (seconds * 1000);

            var results = {
                days: days,
                hours: hours,
                minutes: minutes,
                seconds: seconds,
                milliseconds: milliseconds
            }

            return results;
        }

        const username = ""; // AGOL username
        const password = ""; // AGOL password
        const portalRestUrl = "https://domain.com/sharing/rest"; // AGOL portal url
        const hostedFeatureLayerUrl = "https://utility.arcgis.com/usrsvcs/servers/2d48cb458feb445394d02ddzb7gddb43/rest/services/FOLDER/SERVICE_NAME/FeatureServer/2"; // hosted feature layer url

        // create a new portal session
        const session = new arcgisRest.UserSession({
            username: username,
            password: password,
            portal: portalRestUrl
        });

        // list of OBJECTIDs that will be updated
        var objectidList = [
            12226684,
            12226688,
            12226685,
            12226686,
            12227085,
            12226687,
            12227082,
            12226690,
            12226689,
            12227882,
            12227485,
            12227482,
            12227486,
            12227484,
            12228282,
            12227084,
            12227083,
            12227483,
            12226682,
            12226683
        ];

        // get the current time
        var startTime = new Date();

        objectidList.forEach((oid) =&amp;gt; {

            // perform an update on each feature from their OBJECTID
            arcgisRest.updateFeatures({
                url: hostedFeatureLayerUrl,
                features: [{"attributes":{"OBJECTID":oid,"FIELD_NAME":16171}}],
                authentication: session
            }).then(updateResults =&amp;gt; {
                var currTime = new Date();
                console.log('time delta:', getTimeDelta(startTime, currTime));
                console.log('results of updateFeatures', updateResults);
                console.log(updateResults['updateResults'][0]['objectId']);
                console.log('success', updateResults['updateResults'][0]['success']);
            }, (reason) =&amp;gt; {
                var currTime = new Date();
                console.log('time delta:', getTimeDelta(startTime, currTime));
                console.log('failed', reason);
            });
        });

    &amp;lt;/script&amp;gt;

&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Using ArcGIS REST JS, the above sample takes a hosted feature layer and uses updateFeatures to update a single field for a set of records specified by a list of OBJECTIDs. For every call to updateFeatures, the time it takes for the request to complete is logged in the browser console. From my testing, the code consistently starts giving Error 504s for requests that take longer than 30 seconds.&amp;nbsp;(Despite that the timeout for this service is set to 60 seconds on the server from ArcGIS Server Manager).&lt;BR /&gt;&lt;BR /&gt;Individual updateFeatures requests may take longer on some layers compared to others. So for some layers you may have to use more or less records to get requests to start taking longer than the apparent 30 second timeout.&lt;BR /&gt;&lt;BR /&gt;If I do the exact same thing except making requests directly to our ArcGIS Server, requests will succeed even if they take longer than 30 seconds to complete, which is what we expect:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;gt;
&amp;lt;head&amp;gt;
    &amp;lt;meta charset="UTF-8"&amp;gt;
    &amp;lt;meta http-equiv="X-UA-Compatible" content="IE=edge"&amp;gt;
    &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&amp;gt;
    &amp;lt;title&amp;gt;Document&amp;lt;/title&amp;gt;


    &amp;lt;script src="https://unpkg.com/@esri/arcgis-rest-request@3.4.3/dist/umd/request.umd.min.js"&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script src="https://unpkg.com/@esri/arcgis-rest-feature-layer@3.4.3/dist/umd/feature-layer.umd.min.js"&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script src="https://unpkg.com/@esri/arcgis-rest-auth@3.4.3/dist/umd/auth.umd.min.js"&amp;gt;&amp;lt;/script&amp;gt;

    &amp;lt;script&amp;gt;
        function getTimeDelta(start, stop){
            var timeDelta = parseInt(stop - start);
            var days = parseInt(timeDelta / 86400000);
            var daysRem = timeDelta - (days * 86400000);
            var hours = parseInt(daysRem / 3600000);
            var hoursRem = daysRem - (hours * 3600000);
            var minutes = parseInt(hoursRem / 60000);
            var minutesRem = hoursRem - (minutes * 60000);
            var seconds = parseInt(minutesRem / 1000);
            var milliseconds = minutesRem - (seconds * 1000);

            var results = {
                days: days,
                hours: hours,
                minutes: minutes,
                seconds: seconds,
                milliseconds: milliseconds
            }

            return results;
        }

        var featureServiceUrl = "https://domain.com/server/rest/services/FOLDER/SERVICE_NAME/FeatureServer/2/updateFeatures";
        var generateTokenUrl = "https://domain.com/server/tokens/generateToken";
        var username = "";
        var password = "";

        // call generateToken directly to a ArcGIS Server
        async function generateTokenFromServer(url = '', username = '', password = ''){
            var myHeaders = new Headers();
            myHeaders.append("Content-Type", "application/x-www-form-urlencoded");

            var urlencoded = new URLSearchParams();
            urlencoded.append("f", "json");
            urlencoded.append("username", username);
            urlencoded.append("password", password);
            urlencoded.append("client", "requestip");

            var requestOptions = {
                method: 'POST',
                headers: myHeaders,
                body: urlencoded,
                redirect: 'follow'
            };

            const response = await fetch(url, requestOptions);
            console.log(response);
            return response.json();
        }

        // get a token for calling services
        async function getToken(url, username, password){
            var generateTokenResponse = await generateTokenFromServer(url, username, password);
            return generateTokenResponse['token'];
        }

        // update a field 'FIELD_NAME' for record with provided objectid
        async function updateRecord(url, objectid, fieldValue, token){
            var myHeaders = new Headers();
            myHeaders.append("Content-Type", "application/x-www-form-urlencoded");

            var urlencoded = new URLSearchParams();
            urlencoded.append("f", "json");
            urlencoded.append("features", JSON.stringify([
                {
                    "attributes": {
                        "OBJECTID": objectid,
                        "FIELD_NAME": fieldValue
                    }
                }
            ]));
            urlencoded.append("token", token);

            var requestOptions = {
                method: 'POST',
                headers: myHeaders,
                body: urlencoded,
                redirect: 'follow'
            };

            const response = await fetch(url, requestOptions);
            console.log(response);
            return response.json();
        }


        // list of OBJECTIDs that will be updated
        var objectidList = [
            12226684,
            12226688,
            12226685,
            12226686,
            12227085,
            12226687,
            12227082,
            12226690,
            12226689,
            12227882,
            12227485,
            12227482,
            12227486,
            12227484,
            12228282,
            12227084,
            12227083,
            12227483,
            12226682,
            12226683
        ];

        getToken(generateTokenUrl, username, password).then(token =&amp;gt; {

            // get the current time
            var startTime = new Date();
            var successCount = 0;

            // for each objectid in the list, update it and print how much time has elapsed
            objectidList.forEach(oid =&amp;gt; {
                updateRecord(featureServiceUrl, oid, 16171, token).then(result =&amp;gt; {
                    var currTime = new Date();
                    console.log('time delta:', getTimeDelta(startTime, currTime));
                    successCount += 1;
                    console.log('success count: ', successCount);
                    console.log('results of updateFeatures', result);
                    console.log(result['updateResults'][0]['objectId']);
                    console.log('success', result['updateResults'][0]['success']);
                }, reason =&amp;gt; {
                    var currTime = new Date();
                    console.log('time delta:', getTimeDelta(startTime, currTime));
                    console.log('failed', reason);
                });
            });

        });
    &amp;lt;/script&amp;gt;

&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;So it seems like there is a 30 second timeout specific to AGOL hosted feature layers. Even if updateFeatures operations actually succeed and all the records are updated in the underlying feature class, AGOL will still give a 504 for the requests that take longer than 30 seconds, which is frustrating because you don't know whether or not the request actually succeeded.&lt;BR /&gt;&lt;BR /&gt;In my examples I did multiple single-edits, but I would guess you would see the same timeout for multiple edits in a single request.&lt;/P&gt;</description>
    <pubDate>Fri, 11 Feb 2022 23:18:01 GMT</pubDate>
    <dc:creator>VincentLantaca</dc:creator>
    <dc:date>2022-02-11T23:18:01Z</dc:date>
    <item>
      <title>Intermittent 504 gateway timeouts with hosted feature layers</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/intermittent-504-gateway-timeouts-with-hosted/m-p/275368#M13491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have a customer for whom we have published some data as an ArcGIS online hosted feature service. We have a process that applies changes to the hosted layers based on changes in their database, including adds, updates and deletes. The process is written in python and the code is sending http requests to the layer's REST endpoint (i.e. addFeatures, updateFeatures, deleteFeatures).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code is working fine generally and has been for some months, but we are increasingly seeing intermittent errors in the log for our process that are related to http requests, especially Error 504 (Gateway Timeout). I've looked into error 504 and this suggests a timeout is occuring between internal servers in ArcGIS Online. The error seems to occur most frequently when updating a specific layer (using updateFeatures), which has approx. 4500 features, but occasionally occurs with update requests to other layers with fewer features (approx. 500). It is totally intermittent, so during one run one request might fail, but then the next will succeed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have put in place some work arounds, such as making a number of attempts at the request when it fails and limiting the number of features updated per request. However, we are still seeing some instances of error 504.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm just wondering if anyone else has experience similar when applying regular updates to an AGOL hosted feature service?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.gis4business.co.uk"&gt;GIS4BUSINESS&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Dec 2017 16:02:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/intermittent-504-gateway-timeouts-with-hosted/m-p/275368#M13491</guid>
      <dc:creator>JohnFannon</dc:creator>
      <dc:date>2017-12-07T16:02:25Z</dc:date>
    </item>
    <item>
      <title>Re: Intermittent 504 gateway timeouts with hosted feature layers</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/intermittent-504-gateway-timeouts-with-hosted/m-p/275369#M13492</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd suggest getting in touch with technical support. They can help troubleshoot the specific error, but this shouldn't be something you need to work around depending on how your script is written.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if you need some help getting in contact with support.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Kelly&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Dec 2017 16:51:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/intermittent-504-gateway-timeouts-with-hosted/m-p/275369#M13492</guid>
      <dc:creator>KellyGerrow</dc:creator>
      <dc:date>2017-12-07T16:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: Intermittent 504 gateway timeouts with hosted feature layers</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/intermittent-504-gateway-timeouts-with-hosted/m-p/275370#M13493</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are seeing the exact same issues syncing within an ArcGIS Runtime app.&amp;nbsp; Our suspicion is it is something within the server or network architecture, but haven't been able to pinpoint it yet.&amp;nbsp; I was wondering if you ever got to the bottom of this and if you would be willing to share the answer if you did?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2018 15:07:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/intermittent-504-gateway-timeouts-with-hosted/m-p/275370#M13493</guid>
      <dc:creator>AndyWright</dc:creator>
      <dc:date>2018-03-06T15:07:28Z</dc:date>
    </item>
    <item>
      <title>Re: Intermittent 504 gateway timeouts with hosted feature layers</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/intermittent-504-gateway-timeouts-with-hosted/m-p/275371#M13494</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No - we didn't ever get to the bottom of this and have instead worked around these issues by repeating the request a number of times if unsuccessful. Generally this works, but we still get the occassional instance, perhaps once a week, where it still fails, even after several requests.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My feeling is also that it's something internal to ArcGIS Online, perhaps a load issue where one particular server or database does not respond within an internal timeout. I would have thought Esri would be monitoring these things within the platform, so must be aware that it's happening.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could probably work around the issue in a similar way within ArcGIS Runtime, by re-trying failed requests.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry I can't be of more help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2018 17:03:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/intermittent-504-gateway-timeouts-with-hosted/m-p/275371#M13494</guid>
      <dc:creator>JohnFannon</dc:creator>
      <dc:date>2018-03-06T17:03:35Z</dc:date>
    </item>
    <item>
      <title>Re: Intermittent 504 gateway timeouts with hosted feature layers</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/intermittent-504-gateway-timeouts-with-hosted/m-p/275372#M13495</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, thanks for the response John.&amp;nbsp; If we happen to get to the bottom of this I'll post something here ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2018 19:55:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/intermittent-504-gateway-timeouts-with-hosted/m-p/275372#M13495</guid>
      <dc:creator>AndyWright</dc:creator>
      <dc:date>2018-03-06T19:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: Intermittent 504 gateway timeouts with hosted feature layers</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/intermittent-504-gateway-timeouts-with-hosted/m-p/275373#M13496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We're fighting the same issues with the ArcGIS Python library.&lt;/P&gt;&lt;P&gt;Appears to be totally random when it occurs.&lt;/P&gt;&lt;P&gt;We can run our script for 24 hours without a problem or it can throw an exception in 5 minutes.&lt;/P&gt;&lt;P&gt;It's generally when trying to read or write to/from a hosted layer in the Data Store.&lt;/P&gt;&lt;P&gt;The data is being created by Collector and then we're reading the inspection records, determining the result of the inspection (the status, passed, failed, etc...) and writing that value back up to the Feature's (a Hydrant) record so that the map symbology will change in quasi-real-time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My thought was the same as yours, use nested try:excepts to give a few shots connecting correctly.&amp;nbsp; At some point, toss a fatal exception and stop the process.&amp;nbsp; We're running the process on a 15 minute loop so if it fails, it will start again within 15 min at the most.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's not at all uncommon to see issues like this in the web, right?&amp;nbsp; Lot of switches, etc... that messages have to go through and possibly get bumped around.&amp;nbsp; It would be nice to see the logic for dealing with these issues put into the core code so that we don't have to hack around it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2018 07:13:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/intermittent-504-gateway-timeouts-with-hosted/m-p/275373#M13496</guid>
      <dc:creator>PaulDavidson1</dc:creator>
      <dc:date>2018-05-29T07:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: Intermittent 504 gateway timeouts with hosted feature layers</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/intermittent-504-gateway-timeouts-with-hosted/m-p/275374#M13497</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you provide some additional details about how you are requesting the layer, how often, and what the request is? This shouldn't be intermittently occurring so is something that should be investigate by technical support.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are there any patterns that this follows like after re-writing a service? Can you confirm that this is a service that is hosted in ArcGIS Online? If this is continuing, please get in contact with&amp;nbsp;&lt;A class="link-titled" href="https://support.esri.com/en/contact-tech-support" title="https://support.esri.com/en/contact-tech-support"&gt;Esri Support Contact Support&lt;/A&gt;&amp;nbsp; to look into the specific issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Kelly&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2018 22:19:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/intermittent-504-gateway-timeouts-with-hosted/m-p/275374#M13497</guid>
      <dc:creator>KellyGerrow</dc:creator>
      <dc:date>2018-05-31T22:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: Intermittent 504 gateway timeouts with hosted feature layers</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/intermittent-504-gateway-timeouts-with-hosted/m-p/275375#M13498</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Paul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you confirm that this is using a hosted feature service in ArcGIS Online? What Process are you using to update the data? overwrite or append? With overwrite there is a small amount of down time while the publishing process completes. For this reason, I'd recommend using append if you are adding or updating records. If this continues, please get in contact with technical support.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are some helpful blogs about the append functionality.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.esri.com/arcgis-blog/products/arcgis-online/data-management/whats-new-with-hosted-feature-layers-updating-data-gets-more-flexible-with-append/" title="https://www.esri.com/arcgis-blog/products/arcgis-online/data-management/whats-new-with-hosted-feature-layers-updating-data-gets-more-flexible-with-append/"&gt;What’s new with hosted feature layers: Updating data gets more flexible with append&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.esri.com/arcgis-blog/products/arcgis-online/uncategorized/whats-new-with-hosted-feature-layers-getting-to-know-append-part-1-december-2017/" title="https://www.esri.com/arcgis-blog/products/arcgis-online/uncategorized/whats-new-with-hosted-feature-layers-getting-to-know-append-part-1-december-2017/"&gt;What’s new with hosted feature layers: Getting to know Append Part 1 (December 2017)&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.esri.com/arcgis-blog/products/arcgis-online/uncategorized/whats-new-with-hosted-feature-layers-getting-to-know-append-part-2/" title="https://www.esri.com/arcgis-blog/products/arcgis-online/uncategorized/whats-new-with-hosted-feature-layers-getting-to-know-append-part-2/"&gt;https://www.esri.com/arcgis-blog/products/arcgis-online/uncategorized/whats-new-with-hosted-feature-layers-getting-to-kn…&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Kelly&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2018 22:24:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/intermittent-504-gateway-timeouts-with-hosted/m-p/275375#M13498</guid>
      <dc:creator>KellyGerrow</dc:creator>
      <dc:date>2018-05-31T22:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: Intermittent 504 gateway timeouts with hosted feature layers</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/intermittent-504-gateway-timeouts-with-hosted/m-p/275376#M13499</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kelly,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The requests are to a hosted feature service in ArcGIS Online, via the REST API, through python using urllib/urllib2. The requests are either addFeatures, updateFeatures or deleteFeatures and we have a setting that limits the number of features per request (currently set to 2000).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the moment the script is run every 15 minutes and the work-arounds we have in terms of repeating requests are generally working. Recently we have not seen too many failures and any failed updates generally succeed in a subsequent run of the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It would still be interesting to know what the cause is. I suspect something internal to the platform is timing out when the request contains a large number of adds/updates or when there is heavy load at peak times. Though I've no conculsive evidence to support this or have much time to see if there are any patterns.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jun 2018 11:18:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/intermittent-504-gateway-timeouts-with-hosted/m-p/275376#M13499</guid>
      <dc:creator>JohnFannon</dc:creator>
      <dc:date>2018-06-01T11:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: Intermittent 504 gateway timeouts with hosted feature layers</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/intermittent-504-gateway-timeouts-with-hosted/m-p/275377#M13500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm seeing similar issues with timeouts when appending or deleting content from a feature layer that's hosted on ArcGIS Online.&amp;nbsp; While not 100% consistent, it only happens with large files.&amp;nbsp; The feature layer I'm working with is quite large, over 40M parcels, so the work being performed takes a while, which is to be expected and acceptable.&amp;nbsp; I've looked for a timeout value that I can set to accommodate this without luck. Any suggestions are most welcome!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jun 2018 13:44:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/intermittent-504-gateway-timeouts-with-hosted/m-p/275377#M13500</guid>
      <dc:creator>ChuckBenton</dc:creator>
      <dc:date>2018-06-01T13:44:21Z</dc:date>
    </item>
    <item>
      <title>Re: Intermittent 504 gateway timeouts with hosted feature layers</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/intermittent-504-gateway-timeouts-with-hosted/m-p/275378#M13501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kelly:&lt;/P&gt;&lt;P&gt;Yes, I can confirm that we're reading and writing to (2) hosted feature services in AGOL that are part of a Hosted Feature Layer.&amp;nbsp; They're part of a Relationship Class of a 1:many relationship.&amp;nbsp; &lt;/P&gt;&lt;P&gt;This is basically a Hydrant Inspection program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are using a Python script.&lt;/P&gt;&lt;P&gt;My solution is to loop the script 7 times.&lt;/P&gt;&lt;P&gt;With each loop, read an inspection table, determine an inspection status for new inspections since last loop, write status to the inspection table (the many) and to the Feature Class hosted layer record for that asset (the 1 of 1:many).&amp;nbsp; This can write a multiple number of records at once.&lt;/P&gt;&lt;P&gt;Then sleep for two minutes while more inspections occur.&lt;/P&gt;&lt;P&gt;After 7 loops, it dies out.&lt;/P&gt;&lt;P&gt;Task Scheduler is used to kick it off every 15 minutes so if it does crash, we're only down with our quasi-real time map for ~15 mins max.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This process is working well&amp;nbsp;but of course feels like a hack but it works so I'm good with it.&lt;/P&gt;&lt;P&gt;Looks to me like we're using edit_features rather than append:&lt;/P&gt;&lt;P&gt;# here is where we update the two tables&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if len(InspectionEdits) &amp;gt; 0:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EditInspectionResult = FeatureTable.edit_features(updates=InspectionEdits)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EditHydrantResult = FeatureLayer.edit_features(updates=HydrantEdits)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll read up on using append.&lt;/P&gt;&lt;P&gt;Not exactly intuitive to do an append for an edit but if that's BP, we'll go that route.&lt;/P&gt;&lt;P&gt;I have found that we sometimes crash just reading the Feature Layer info, it's pretty random.&lt;/P&gt;&lt;P&gt;It's the web is how I tend to look at it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the append pointer.&amp;nbsp; I'll report back after a chance to work it over.&lt;/P&gt;&lt;P&gt;Could be a while since we're cranking along (it ain't broke...)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2018 23:47:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/intermittent-504-gateway-timeouts-with-hosted/m-p/275378#M13501</guid>
      <dc:creator>PaulDavidson1</dc:creator>
      <dc:date>2018-06-06T23:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: Intermittent 504 gateway timeouts with hosted feature layers</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/intermittent-504-gateway-timeouts-with-hosted/m-p/275379#M13502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Kelly:&lt;/P&gt;&lt;P&gt;Looks like the postings are really just about using the append tool with the hosted layers.&amp;nbsp; Our issue is crashes in code which I'm pretty sure is due to timeouts.&amp;nbsp; Like Chuck says below, I haven't found anyway to set those values.&lt;/P&gt;&lt;P&gt;As Paul Barker lays out in his writings, we're basically doing upserts.&amp;nbsp; I think most updates in a database work as upserts.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I would think append is not applicable here but I'll dig into the ArcGIS python library when I can.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2018 00:07:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/intermittent-504-gateway-timeouts-with-hosted/m-p/275379#M13502</guid>
      <dc:creator>PaulDavidson1</dc:creator>
      <dc:date>2018-06-07T00:07:12Z</dc:date>
    </item>
    <item>
      <title>Re: Intermittent 504 gateway timeouts with hosted feature layers</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/intermittent-504-gateway-timeouts-with-hosted/m-p/275380#M13503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Our issues didn't result from using append. We are sending requests directly to the REST endpoint via python (as the code was developed prior to the ArcGIS Python API) and getting the 504 gateway timeout errors. Any methods you are using via the ArcGIS Python API will ultimately result in a http request to the REST endpoint of the service using applyEdits, updateFeatures, addFeatures, or deleteFeatures operations, which are exactly the same operations we are using directly via python.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, setting any timout options on the client-side requests makes no difference, since these cover the client-side timeouts only and the error (504 gateway timeout) comes from an internal timeout on the server-side. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Within our code, we are capturing the http error and re-sending the same request again multiple times. In most cases this works, but occassionally we still get failures after multiple attempts. These don't result in crashes as we just log the error and continue.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2018 08:49:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/intermittent-504-gateway-timeouts-with-hosted/m-p/275380#M13503</guid>
      <dc:creator>JohnFannon</dc:creator>
      <dc:date>2018-06-07T08:49:37Z</dc:date>
    </item>
    <item>
      <title>Re: Intermittent 504 gateway timeouts with hosted feature layers</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/intermittent-504-gateway-timeouts-with-hosted/m-p/275381#M13504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am also experiencing this behavior. After 4 months of flawless performance, an overwrite function has started failing intermittently due to a timeout. I'm using the python API (1.4.1) as show below. These are the&amp;nbsp;hosted feature datasets I am&amp;nbsp;updating:&lt;BR /&gt;&lt;A class="link-titled" href="http://spokanecounty.maps.arcgis.com/home/item.html?id=5805ca391e5f4c1ca6f0e58aee0d46a6" title="http://spokanecounty.maps.arcgis.com/home/item.html?id=5805ca391e5f4c1ca6f0e58aee0d46a6" rel="nofollow noopener noreferrer" target="_blank"&gt;http://spokanecounty.maps.arcgis.com/home/item.html?id=5805ca391e5f4c1ca6f0e58aee0d46a6&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;&lt;A class="link-titled" href="http://spokanecounty.maps.arcgis.com/home/item.html?id=b6b1e7f8e12c4a9ba78af72076aee7af" title="http://spokanecounty.maps.arcgis.com/home/item.html?id=b6b1e7f8e12c4a9ba78af72076aee7af" rel="nofollow noopener noreferrer" target="_blank"&gt;http://spokanecounty.maps.arcgis.com/home/item.html?id=b6b1e7f8e12c4a9ba78af72076aee7af&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;&lt;A class="link-titled" href="http://spokanecounty.maps.arcgis.com/home/item.html?id=848144f660a741f4b274360d494f15a1" title="http://spokanecounty.maps.arcgis.com/home/item.html?id=848144f660a741f4b274360d494f15a1" rel="nofollow noopener noreferrer" target="_blank"&gt;http://spokanecounty.maps.arcgis.com/home/item.html?id=848144f660a741f4b274360d494f15a1&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;I believe&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;A href="https://support.esri.com/en/bugs/nimbus/QlVHLTAwMDExNTI1Mw==" style="color: #2989c5; text-decoration: none;" rel="nofollow noopener noreferrer" target="_blank"&gt;BUG-000115253&lt;/A&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;may be&lt;/SPAN&gt;&amp;nbsp;associated.&amp;nbsp;This was identified&amp;nbsp;in 1.4.2.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;SPAN&gt;Bug synopsis:&amp;nbsp;&lt;SPAN style="color: #595959; background-color: #ffffff; font-weight: 300;"&gt;When using the overwrite method from arcgis.features.managers.FeatureLayerCollectionManager, ArcGIS API for Python returns the error "Exception: Job Failed.''&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;example:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcgis

gis &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcgis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;gis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GIS&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fspokanecounty.maps.arcgis.com" target="_blank"&gt;https://spokanecounty.maps.arcgis.com&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;usr&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;pw&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

item &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; gis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;content&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;get&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;itemID&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

dataPath &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"\\\\&amp;lt;path&amp;gt;\\Parcels.zip"&lt;/SPAN&gt;

status &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcgis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;features&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;FeatureLayerCollection&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;fromitem&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;item&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;manager&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;overwrite&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;dataPath&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;error log:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;Traceback (most recent call last):
&amp;nbsp; File "C:\Automation\Python\Jobs-ISD\AGOLUpdate\Code\AGOLUpdate.py", line 117, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; overwriteStatus = overwriteAGOLfeature(dataName,data.get('itemID'),data.get('zipData'))
&amp;nbsp; File "C:\Automation\Python\Jobs-ISD\AGOLUpdate\Code\AGOLUpdate.py", line 87, in overwriteAGOLfeature
&amp;nbsp;&amp;nbsp;&amp;nbsp; status = arcgis.features.FeatureLayerCollection.fromitem(item).manager.overwrite(dataPath)
&amp;nbsp; File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis-1.3.0-py3.5.egg\arcgis\features\managers.py", line 771, in overwrite
&amp;nbsp;&amp;nbsp;&amp;nbsp; if related_data_item.update(data=data_file):
&amp;nbsp; File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis-1.3.0-py3.5.egg\arcgis\gis\__init__.py", line 4994, in update
&amp;nbsp;&amp;nbsp;&amp;nbsp; large_thumbnail)
&amp;nbsp; File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis-1.3.0-py3.5.egg\arcgis\_impl\portalpy.py", line 2144, in update_item
&amp;nbsp;&amp;nbsp;&amp;nbsp; resp = self.con.post(path, postdata, files)
&amp;nbsp; File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis-1.3.0-py3.5.egg\arcgis\_impl\connection.py", line 1076, in post
&amp;nbsp;&amp;nbsp;&amp;nbsp; resp = opener.open(req)
&amp;nbsp; File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\urllib\request.py", line 472, in open
&amp;nbsp;&amp;nbsp;&amp;nbsp; response = meth(req, response)
&amp;nbsp; File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\urllib\request.py", line 582, in http_response
&amp;nbsp;&amp;nbsp;&amp;nbsp; 'http', request, response, code, msg, hdrs)
&amp;nbsp; File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\urllib\request.py", line 510, in error
&amp;nbsp;&amp;nbsp;&amp;nbsp; return self._call_chain(*args)
&amp;nbsp; File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\urllib\request.py", line 444, in _call_chain
&amp;nbsp;&amp;nbsp;&amp;nbsp; result = func(*args)
&amp;nbsp; File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\urllib\request.py", line 590, in http_error_default
&amp;nbsp;&amp;nbsp;&amp;nbsp; raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 504: Gateway Time-out&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:25:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/intermittent-504-gateway-timeouts-with-hosted/m-p/275381#M13504</guid>
      <dc:creator>PhilLarkin1</dc:creator>
      <dc:date>2021-12-11T13:25:27Z</dc:date>
    </item>
    <item>
      <title>Re: Intermittent 504 gateway timeouts with hosted feature layers</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/intermittent-504-gateway-timeouts-with-hosted/m-p/275382#M13505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, What was the solution for this problem ?? I have the same problem. My script was running normally and when i have more data it stops at all. It always giving the error of HTTP Error 500: Internal ServerError and sometimes Error 504.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2018 17:27:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/intermittent-504-gateway-timeouts-with-hosted/m-p/275382#M13505</guid>
      <dc:creator>WASHSECTOR</dc:creator>
      <dc:date>2018-09-26T17:27:09Z</dc:date>
    </item>
    <item>
      <title>Re: Intermittent 504 gateway timeouts with hosted feature layers</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/intermittent-504-gateway-timeouts-with-hosted/m-p/275383#M13506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is in fact associated with the bug. The severity is logged as low.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG style="font-size: 11.0pt;"&gt;BUG-000115253: When using the overwrite method from arcgis.features.managers.FeatureLayerCollectionManager, ArcGIS API for Python returns the error "Exception: Job Failed.''&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://support.esri.com/en/bugs/nimbus/QlVHLTAwMDExNTI1Mw==" title="https://support.esri.com/en/bugs/nimbus/QlVHLTAwMDExNTI1Mw=="&gt;BUG-000115253: When using the overwrite method from arcgis.features..&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2018 22:31:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/intermittent-504-gateway-timeouts-with-hosted/m-p/275383#M13506</guid>
      <dc:creator>PhilLarkin1</dc:creator>
      <dc:date>2018-12-12T22:31:44Z</dc:date>
    </item>
    <item>
      <title>Re: Intermittent 504 gateway timeouts with hosted feature layers</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/intermittent-504-gateway-timeouts-with-hosted/m-p/275384#M13507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The analyst with my case suggested using arcpy.sharing instead of the overwrite function in arcgis python api.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://pro.arcgis.com/en/pro-app/arcpy/sharing/introduction-to-arcpy-sharing.htm" title="http://pro.arcgis.com/en/pro-app/arcpy/sharing/introduction-to-arcpy-sharing.htm"&gt;Introduction to arcpy.sharing—Sharing module | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Dec 2018 17:26:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/intermittent-504-gateway-timeouts-with-hosted/m-p/275384#M13507</guid>
      <dc:creator>PhilLarkin1</dc:creator>
      <dc:date>2018-12-17T17:26:42Z</dc:date>
    </item>
    <item>
      <title>Re: Intermittent 504 gateway timeouts with hosted feature layers</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/intermittent-504-gateway-timeouts-with-hosted/m-p/275385#M13508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The OP said that he was using http requests in conjunction with AGOL.&amp;nbsp; Will this be an issue when the next update is applied to AGOL in February based on the TLS security update?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Dec 2018 17:31:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/intermittent-504-gateway-timeouts-with-hosted/m-p/275385#M13508</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2018-12-17T17:31:10Z</dc:date>
    </item>
    <item>
      <title>Re: Intermittent 504 gateway timeouts with hosted feature layers</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/intermittent-504-gateway-timeouts-with-hosted/m-p/275386#M13509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As discussed above, we are using http requests via Python. Therefore whether any changes are required for the February TLS 1.2 update depends on the version of ArcGIS and therefore Python that is installed. In this case, our customer has ArcGIS 10.4.x, which installs Python 2.7.10, which uses TLS 1.2 by default, so should not require any changes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whether the python version uses TLS 1.2 can be determined by following the steps mentioned here - &lt;A class="link-titled" href="https://www.calazan.com/how-to-check-if-your-python-app-supports-tls-12/" title="https://www.calazan.com/how-to-check-if-your-python-app-supports-tls-12/"&gt;How to check if your Python app supports TLS 1.2 | Calazan.com.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, if you're using ArcGIS Desktop to connect to ArcGIS Online or other connection methods, then you may need to take some action. There is more information available here - &lt;A class="link-titled" href="https://support.esri.com/en/tls?adumkts=product&amp;amp;adupro=ArcGIS_Platform&amp;amp;aduc=email&amp;amp;adum=list&amp;amp;utm_Source=email&amp;amp;aduca=ArcGIS_Pro_Announcements&amp;amp;aduat=letter&amp;amp;adut=253701--TLS-Announcement-Email-for-Desktop-Enterprise-Customers&amp;amp;aducp=simple_body_text" title="https://support.esri.com/en/tls?adumkts=product&amp;amp;adupro=ArcGIS_Platform&amp;amp;aduc=email&amp;amp;adum=list&amp;amp;utm_Source=email&amp;amp;aduca=ArcGIS_Pro_Announcements&amp;amp;aduat=letter&amp;amp;adut=253701--TLS-Announcement-Email-for-Desktop-Enterprise-Customers&amp;amp;aducp=simple_body_text"&gt;Esri Support Important Updates for the ArcGIS Platform and Transport Layer Security (TLS) Protocol Support&lt;/A&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2018 12:31:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/intermittent-504-gateway-timeouts-with-hosted/m-p/275386#M13509</guid>
      <dc:creator>JohnFannon</dc:creator>
      <dc:date>2018-12-18T12:31:23Z</dc:date>
    </item>
    <item>
      <title>Re: Intermittent 504 gateway timeouts with hosted feature layers</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/intermittent-504-gateway-timeouts-with-hosted/m-p/275387#M13510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's a bug that continues to persist and esri's workaround is basically to keep trying until it works... We've been getting 500, 502, 503, and 504 errors. I was told that the 500 and 504 errors are rolled into the 502 bug. Our process tries 3 times, and even then it still fails. Hopefully esri will realize that retrying multiple times is not a valid "workaround". I've also ran into these errors even through their ui when viewing data on a map and looking at the data table. After talking with some guys at the UC last year, it sounded like it might be a symptom of their back-end scaling up and caching an error response while it is.&amp;nbsp;&lt;A href="https://community.esri.com/migrated-users/3063"&gt;Kelly Gerrow&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"&lt;SPAN style="color: #4c4c4c; background-color: #ffffff;"&gt;Re-submit the requests to resolve the intermittent errors. Scripts or tools can be set up with retry on failure logic."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://my.esri.com/#/support/bugs/BUG-000124290" style="color: #005e95; background-color: #f8f8f8; font-weight: 300; text-decoration: underline;" title="Making 'query' and 'applyEdits' requests to the ArcGIS Online hosted feature service intermittently return the 502 error."&gt;BUG-000124290 Making 'query' and 'applyEdits' requests to the ArcGIS Online hosted feature service intermittently return the 502 error.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://my.esri.com/#/support/bugs/BUG-000123780" style="color: #005e95; background-color: #f8f8f8; font-weight: 300; text-decoration: underline;" title="Making 'query' and 'applyEdits' requests to the ArcGIS Online hosted feature service intermittently returns 503 errors."&gt;BUG-000123780 Making 'query' and 'applyEdits' requests to the ArcGIS Online hosted feature service intermittently returns 503 errors.&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Oct 2019 21:28:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/intermittent-504-gateway-timeouts-with-hosted/m-p/275387#M13510</guid>
      <dc:creator>DavidRunneals2</dc:creator>
      <dc:date>2019-10-08T21:28:02Z</dc:date>
    </item>
  </channel>
</rss>

