-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Container Terminates with 503 Error after ‘az webapp up’ Deployment #961
Comments
HI @ZMaguffin22 , it looks like there is an issue with the environment variable The variable's value should be set to the name of your model deployment on your Azure OpenAI resource. Can you double check the value of this variable in your app settings in your deployed app to be sure that it is set to the correct value? |
Hi abhan, Confirming it is assigned to the model deployment for my Azure OpenAI resource, I've tried recreating my OpenAI resource and deployment's but still having the issue. Let me know if there's any other log's that would help. |
open a new terminal in local ide and select cmd , |
Just wanted to check if there were any other error logs before the lines you shared previously. I'm asking in case this exception may have been triggered by a different exception. |
I'm having the same issue, no other error logs prior to this one. Just repeated tries by the gunicorn worker to start up. This occurs when I deploy with I'm not sure how to check if this variable is set in the app settings of the deployed app? It is set in EDIT: After some debugging, it seems that the .env file cannot be found. I tried to enforce the location to Any advice would be appreciated! |
I've been getting the same issue as well when deploying. The app compiles fine locally, but when running az webapp up as mentioned by others here as well, it builds the app fine, but whenever it's trying to start the website, it errors out since the logs give the error: Has anybody here figured out a solution? It would be greatly appreciated. Thanks! |
This issue is stale because it has been open for 30 days with no activity. |
As @abhahn commented, the model variable (and other relevant variables) must be manually set within the _AzureOpenAISettings class in the settings.py file. For some odd reason, the settings in the .env file are being ignored. |
When doing an az webapp up on a new repository setup with any model version, chat with your own data (AI Search) and Chat history enabled. the container keeps terminating and causing a 503 error. Run an az web app up like the instructions provide either with a new or existing app service, the app receives an 503 error where expected behavior would be for the app to be reachable.
Runtime and Startup Command.
{
"runtime": "PYTHON|3.11",
"startupCommand": "python3 -m gunicorn app:app"
}
The log stream's traceback ultimately end's with this before terminating the containers.
2024-06-25T19:46:45.4119587Z azure_openai: _AzureOpenAISettings = _AzureOpenAISettings()
2024-06-25T19:46:45.4119626Z ^^^^^^^^^^^^^^^^^^^^^^
2024-06-25T19:46:45.4119683Z File "/tmp/8dc954dd1d2c200/antenv/lib/python3.11/site-packages/pydantic_settings/main.py", line 84, in init
2024-06-25T19:46:45.4119719Z super().init(
2024-06-25T19:46:45.4119760Z File "/tmp/8dc954dd1d2c200/antenv/lib/python3.11/site-packages/pydantic/main.py", line 176, in init
2024-06-25T19:46:45.4119798Z self.pydantic_validator.validate_python(data, self_instance=self)
2024-06-25T19:46:45.4119837Z pydantic_core._pydantic_core.ValidationError: 1 validation error for _AzureOpenAISettings
2024-06-25T19:46:45.4119872Z model
2024-06-25T19:46:45.4119910Z Field required [type=missing, input_value={}, input_type=dict]
The text was updated successfully, but these errors were encountered: