In Azure I am using a python web application and using a system assigned managed identity to access an azure sql database. The code works fine locally.
The original code:
azure_credentials = identity.DefaultAzureCredential()
raw_token = azure_credentials.get_token(TOKEN_URL).token.encode("utf-16-le")
results in 2022-10-06T14:13:28.375074194Z [INFO azure.identity._credentials.chained] DefaultAzureCredential acquired a token from ManagedIdentityCredential 2022-10-06T14:13:29.630486437Z [2022-10-06 14:13:29 +0000] [87] [WARNING] Worker with pid 91 was terminated due to signal 11 2022-10-06T14:13:29.658152384Z [2022-10-06 14:13:29 +0000] [97] [INFO] Booting worker with pid: 97
Why does get_token cause the thread to terminate?