In our organization, we have developed a utility using ArcGIS API for python in which we are capturing users properties (username, first name, Lastname, email, role, last login, etc), groups properties (group_title, group_owner, groupid, no. of items, no. of users, etc) and items properties (item_title, item_owner, item_id, item_type, item_size, etc)
So for the development purpose, I am testing or running the python script at an interval of one hour using a batch file on the task scheduler. And once we will deploy it on the production environment it will run once a week. The total time taken by the script to capture all the properties is around 50 minutes.
I am encountering 502 bad gateway error while collecting users properties or items properties. And when I increased the time interval of testing from one to three hours. The frequency of 502 bad gateway error got decreased. And finally when I increased the time interval to four hours the 502 bad gateway got disappeared.
I want to know that the error ( 502 bad gateway ) we were encountering Is it due to the request that we are making very frequently to AGOL or is it is due to something else?