Azure-Samples / azure-search-openai-demo

A sample app for the Retrieval-Augmented Generation pattern running in Azure, using Azure AI Search for retrieval and Azure OpenAI large language models to power ChatGPT-style and Q&A experiences.
https://azure.microsoft.com/products/search
MIT License
6.13k stars 4.17k forks source link

Getting errors like Memory Exceeded (Out-of-Memory Errors) while deploying #2081

Open AdnanShahid405 opened 1 week ago

AdnanShahid405 commented 1 week ago

SCREENSHOT

MAIN INFO:

This issue is for a: (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Run azd up or azd deploy commands in the Azure-Samples/azure-search-openai-demo project environment. Deploying in this configuration results in the bot failing to start, potentially due to Docker memory constraints or missing dependencies in the container.

Any log messages given by the failure

2024-10-23 14:40:18.742 - ERROR - Worker (pid:93) was sent SIGKILL! Perhaps out of memory?
2024-10-23 23:45:47.907 - ERROR - ModuleNotFoundError: No module named 'main'
2024-10-24 13:49:59.818 - ERROR - Worker (pid:92) was sent SIGTERM!
2024-10-24 13:50:02.833 - ERROR - Container didn't respond to HTTP pings on port: 8000, failing site start. See container logs for debugging.

Expected/desired behavior

The bot should successfully start, handle requests, and function without memory overuse or dependency issues causing it to fail.

OS and Version?

Linux (Azure App Service)

azd version?

azd 1.10.1

Mention any other details that might be useful

The following issues were observed:

  • Multiple memory-related errors suggesting that Docker containers may be exceeding allocated memory.
  • "ModuleNotFoundError: No module named 'main'" in Python, indicating a possible missing or misconfigured module in the container.
  • Worker processes receive SIGKILL and SIGTERM signals, further suggesting memory constraints or other resource limits.
  • Container fails to start and respond to HTTP pings on port 8000.

This issue may relate to the default resource allocation in the Azure App Service or missing dependencies in the container setup.

pamelafox commented 4 days ago

@AdnanShahid405 That sounds like an intermittent issue with App Service deployment. Can you try Container Apps deployment? That's the new default host, as of last week: https://github.com/Azure-Samples/azure-search-openai-demo/releases/tag/2024-10-28 Generally deployments for this repo more reliably succeed with Container Apps.