Azure function outputs "Database Error DBSAllocHandle" error when triggered, what may be causing the issue?

Dardi 0 Reputation points
2023-05-31T15:49:34.8133333+00:00

Hello,

I am successfully deploying an Azure function via PyCharm, however even though the function runs with no issues locally when triggering the function after deploying it to Azure it outputs the following error:

Failure Exception: DatabaseError: DBSAllocHandle invoked failed. Stack: File "/azure-functions-host/workers/python/3.7/LINUX/X64/azure_functions_worker/dispatcher.py", line 482, in _handle__invocation_request invocation_id, fi_context, fi.func, args) File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/azure-functions-host/workers/python/3.7/LINUX/X64/azure_functions_worker/dispatcher.py", line 753, in _run_sync_func func)(params) File "/azure-functions-host/workers/python/3.7/LINUX/X64/azure_functions_worker/extension.py", line 215, in _raw_invocation_wrapper result = function(**args) File "/home/site/wwwroot/HttpTrigger/__init__.py", line 32, in main ctx = get_connection() File "/home/site/wwwroot/HttpTrigger/__init__.py", line 7, in get_connection return mod.connect("AuthScheme=Password;

I am using a snowflake connector to access certain data and print them as HTTP Response.

I am importing the external library via the requirements .txt accordingly and the deployment log does not report any issue.

Any idea on what might be the issue here?

Thank you in advance!

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,644 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Dronec 171 Reputation points
    2024-02-15T09:48:05.2633333+00:00

    If your function runs locally but not in Azure Function runtime, it might indicate that you hit some limits (e.g. RAM) in there. For the sake of experiment, try to deploy it in App plan.

    0 comments No comments