Skip to content
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

Open
ZMaguffin22 opened this issue Jun 25, 2024 · 4 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@ZMaguffin22
Copy link

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]

@ZMaguffin22 ZMaguffin22 added the bug Something isn't working label Jun 25, 2024
@abhahn abhahn self-assigned this Jun 26, 2024
@abhahn
Copy link
Member

abhahn commented Jun 26, 2024

HI @ZMaguffin22 , it looks like there is an issue with the environment variable AZURE_OPENAI_MODEL based on the stack trace above. The settings are validated using pydantic-settings, which is where this error is coming from. The value of this variable can't be empty, since it is needed to make a successful request to Azure OpenAI.

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?

@ZMaguffin22
Copy link
Author

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.

@prakhar-18
Copy link

open a new terminal in local ide and select cmd ,
type set ENVIRONMENT="your env file last name"
try with this.

@abhahn
Copy link
Member

abhahn commented Jul 1, 2024

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.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants