[SOLVED] Production API endpoint not responding

Hello
one of my paid-account production endpoints this morning refuses to answer calls.
From my application API-call-logs in the DB, I see the last API call that was answered was on 19 Sep 2021, 15:53:07.881

Now, the client waits a lot then, after the timeout expires, I get the error in Console Chrome: The FetchEvent for "https://my_endpoint.anvil.app/_/api/my_endpoint/1b91fbef-g331-417c-bd81-fb62d8279a02?param1=true&param2=true" resulted in a network error response: the promise was rejected.

Console says:

Request URL: https://my_endpoint.anvil.app/_/api/my_endpoint/1b91fbef-g331-417c-bd81-fb62d8279a02?param1=true&param2=true
Referrer Policy: strict-origin-when-cross-origin
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Accept-Encoding: gzip, deflate, br
Accept-Language: it-IT,it;q=0.9,en-US;q=0.8,en;q=0.7
Cache-Control: max-age=0
Connection: keep-alive
Cookie: anvil-test-cookie=true; anvilapp-shared=; anvilapp=<anvil-app-id>; ring-session=<ID>; _ga=GA1.2.1438457226.1631727337; anvil-test-cookie=true; anvil-session-<id>
Host: my_endpoint.anvil.app
sec-ch-ua: "Google Chrome";v="93", " Not;A Brand";v="99", "Chromium";v="93"
sec-ch-ua-mobile: ?0
sec-ch-ua-platform: "Windows"
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: same-origin
Sec-Fetch-Site: same-origin
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36
soppresse: true
formatted: true

The app gives a HTTPERROR:0

My code is enabled for Cors (just added the 2 debug prints):

@anvil.server.http_endpoint("/my_endpoint/:api_key", enable_cors=True)
def my_endpoint(api_key, **params):
  print("1")
  try:
    print("2")
....
....

I can’t see the debug prints in the logs…
This is client-code, but the API call is a simpel GET and even by using Postman (or putting the API-call URL directly in the browser) still doesn’t work, with the same error codes after the timeout. So I don’t really think that the problem is the call coming from the client insted of the server.

Is something going on in Anvil environment?

This webservice serves 5 production APPs that - for this reason - this morning are not working.

BR

I’m going to guess it’s related to this:

1 Like

Hi @robert
yes I think it’s related to your issue, but I don’t think it’s related to migration to the new IDE.
Ian told me there was an infrastructure issue that should be now solved.
My endpoint is working now, check your applications.
Thanks for your quick answer.
BR

1 Like