This guide provides solutions to common issues you may encounter when deploying and running the AI agents application.
Problem: Timeouts or provisioning resources fail Solution:
- Change the location of your resource group, as there may be availability constraints for resources
- Call
azd downand remove your current resources - Delete the
.azurefolder from your workspace - Call
azd upagain and select a different region
Debug Commands:
- Use
azd showto display information about your app and resources - Use
azd deploy --debugto enable debugging and logging while deploying the application's code to Azure
General Checks:
- Ensure that your
azandazdtools are up to date - After fully deploying with azd, additional errors in the Azure Portal may indicate that your latest code has not been successfully deployed
Problem: ACA does not boot up Possible Causes: Deployment failure due to quota constraints, permission issues, or resource availability Solution: Check failures in the deployment and container app logs in the Azure Portal
Console Traces:
- Can be found in the Azure Portal, but they may be unreliable
- Use Python's logging with INFO level
- Adjust Azure HTTP logging to WARNING
Frontend Debugging:
- Once your ACA is deployed, utilize the browser debugger (F12)
- Clear cache (CTRL+SHIFT+R) to help debug the frontend for better traceability
Problem: Agent is occasionally unresponsive Cause: Your model may have reached its rate limit Solution:
- Increase quota by adjusting the bicep configuration
- Edit the model in the Microsoft Foundry page for your project's model deployments
Problem: Agent is crashing Solution: Confirm that you are using a model that you have deployed to your project
How it Works:
- This application is designed to serve multiple users on multiple browsers
- Uses cookies to ensure that the same thread is reused for conversations across multiple tabs in the same browser
- If the browser is restarted, the old thread will continue to serve the user
- If the application has a new agent after a server restart or a thread is deleted, a new thread will be created without requiring a browser refresh or signaling to the users
Technical Details:
- When users submit a message to the web server, the web server will create an agent, thread, and stream back a reply
- The response contains
agent_idandthread_idin cookies - Each subsequent message sent to the web server will also contain these IDs
- As long as the same agent is being used in the system and the thread can be retrieved in the cookie, the same thread will be used to serve the users
Best Practices:
- Use filename-based downloads to avoid storing files in dictionaries
- Intermittent errors may arise when retrieving filenames for file IDs, which may be mitigated by using a single worker and fresh threads for each new agent
- File citation can be enhanced by automatically including filenames to reduce manual steps
If you continue to experience issues after trying these solutions:
- Check the Microsoft Foundry documentation
- Review the Azure Container Apps troubleshooting guide
- Consult the Azure Developer CLI reference
- For agent-specific issues, refer to the Azure AI Agents documentation