1

I'm experiencing some weird issues with Azure Functions that I can't find too much information on.

I am creating a function that makes an API call, but more importantly reads/writes to a json file. You are able to view this in the updateJson() function.

My Function App deploys successfully and I'm able to view it on Azure. The majority of the time I receive the beneath errors:

1. Failed to fetch the file content 
2. Azure Functions Runtime is unreachable
3. Adding third party dependencies in the Azure portal is currently not supported for Linux Consumption Function Apps

Beneath are the imports I'm using along with my requirements.txt file.

Imports:

Imports

Requirements.txt:

enter image description here

Function 503:

Image showing 503 error and reading/writing to json file

I'm making use of the beneath to locate the dir for the json file I'm reading/writing from/to:

script_dir = os.path.dirname(__file__)
with open(os.path.join(script_dir, 'team.json')) as f:

I'm overall very confused with what is happening. Has anyone experienced anything similar? I've included logging.info statements within my script to see where the failure occurs. I'm not sure whether this is the issue or if its got to do with my imports. I've made use of requests and other imports in other Python Azure Functions and they've worked just fine.

Any help is greatly appreciated; please ask if you require further information.

Runtime unreachable

geojoe
  • 329
  • 1
  • 3
  • 12

1 Answers1

0

According to Document it says,

Check if the storage account Exists, Make sure your storage account is accessible by your Azure Function App, Check your firewall configuration, Make sure your execution quota is not full.

References:

RithwikBojja
  • 5,069
  • 2
  • 3
  • 7