Hello!
I was working on updating a script that was working a few days ago when I suddenly started getting a 503 error that said the service was temporarily unavailable. The python script in question uses the asana API to gather custom field data for every task in a project. However, it suddenly began erroring out after a varying number of queries. This happens at seemingly random increments over 50 queries, and it doesn’t affect a separate script I use to collect data from another Asana project.
Here is the exact error output:
Exception when calling Asana API: (503)
Reason: Service Temporarily Unavailable
HTTP response headers: HTTPHeaderDict({'Server': 'CloudFront', 'Date': 'Sun, 15 Dec 2024 23:19:24 GMT', 'Content-Type': 'text/html', 'Content-Length': '981', 'Connection': 'keep-alive', 'X-Cache': 'LambdaLimitExceeded from cloudfront', 'Via': '1.1 7b7f9409a41e78466e3ab2772654a73c.cloudfront.net (CloudFront)', 'X-Amz-Cf-Pop': 'ATL58-P7', 'X-Amz-Cf-Id': 'KWJ41HBzHIOw4xb-mAy14tYl4avy_Rw7XSdGndmkVK4dOjV3OjU1wg==', 'X-XSS-Protection': '1; mode=block', 'X-Frame-Options': 'SAMEORIGIN', 'Referrer-Policy': 'strict-origin-when-cross-origin', 'Content-Security-Policy': "report-uri /-/csp_report?report_only=false; script-src 'self' 'unsafe-inline' https://ssl.gstatic.com https://apis.google.com https://accounts.google.com/gsi/client https://d3ki9tyy5l5ruj.cloudfront.net https://d1gwm4cf8hecp4.cloudfront.net https://d1a3usp4brejtz.cloudfront.net https://oauth.googleusercontent.com https://app.box.com https://platform.twitter.com https://connect.facebook.net https://platform.harvestapp.com https://www.google.com https://docs.google.com https://www.gstatic.com https://www.dropbox.com https://www.paypal.com/sdk/js https://recordwidget.vimeocdn.com https://api.stripe.com https://hooks.stripe.com https://js.stripe.com https://m.stripe.com https://m.stripe.network https://q.stripe.com https://prod-eu1.app.asana.com https://prod-au1.app.asana.com https://prod-jp1.app.asana.com https://cdn.cookielaw.org https://resources.asana.com https://ccwizard.vertexsmb.com https://*.qualtrics.com; frame-ancestors 'self' https://teams.integrations.asana.plus https://teams-beta.integrations.asana.plus https://teams-uat.integrations.asana.plus https://teams.microsoft.com https://localhost.asana.com:8180/; frame-src 'self' blob: https://www.figma.com https://*.invisionapp.com https://invis.io https://miro.com https://whimsical.com https://www.loom.com https://www.youtube.com https://player.vimeo.com https://fast.wistia.com https://www.canva.com https://xd.adobe.com https://*.looker.com https://lucid.app https://*.okta.com https://*.sharepoint.com https://accounts.google.com https://accounts.google.com/gsi/ https://content.googleapis.com https://www.google.com https://docs.google.com https://fast.wistia.net https://www.dropbox.com https://platform.harvestapp.com https://forms.asana.plus https://forms-server.asana.plus https://local.asana.com https://asana.com https://apisandbox.zuora.com https://test.zuora.com https://www.zuora.com https://www.sandbox.paypal.com https://www.paypal.com https://recordwidget.vimeocdn.com https://api.stripe.com https://hooks.stripe.com https://js.stripe.com https://m.stripe.com https://m.stripe.network https://q.stripe.com https://d3ki9tyy5l5ruj.cloudfront.net https://prod-eu1.app.asana.com https://prod-au1.app.asana.com https://prod-jp1.app.asana.com https://cdn.cookielaw.org https://form.asana.com https://form-beta.asana.com https://resources.asana.com https://ccwizard.vertexsmb.com https://*.qualtrics.com; worker-src 'self' blob: https://d3ki9tyy5l5ruj.cloudfront.net; child-src 'self' blob: https://d3ki9tyy5l5ruj.cloudfront.net; object-src 'self'; plugin-types application/pdf; base-uri 'none'", 'X-Content-Type-Options': 'nosniff', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload', 'X-Robots-Tag': 'none', 'X-UA-Compatible': 'IE=edge,chrome=1'})
HTTP response body: b'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\n<HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">\n<TITLE>ERROR: The request could not be satisfied</TITLE>\n</HEAD><BODY>\n<H1>503 ERROR</H1>\n<H2>The request could not be satisfied.</H2>\n<HR noshade size="1px">\nThe Lambda function associated with the CloudFront distribution was throttled.\nWe can\'t connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.\n<BR clear="all">\nIf you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.\n<BR clear="all">\n<HR noshade size="1px">\n<PRE>\nGenerated by cloudfront (CloudFront)\nRequest ID: KWJ41HBzHIOw4xb-mAy14tYl4avy_Rw7XSdGndmkVK4dOjV3OjU1wg==\n</PRE>\n<ADDRESS>\n</ADDRESS>\n</BODY></HTML>'