I'm having trouble getting a private Azure Function to work reliably. I've set it up several times, and every time it seems to work fine initially. I can create and run a simple test function, and then I tell my developers it's ready to go. But when they log in to use it, they encounter a vague 'InternalServerError' from the host runtime. The overview section shows the runtime is running, but I can't get it to work consistently. Here's my setup:
- VNET integration for outbound access
- Inbound private endpoints
- Azure firewall with a route table for the integrated subnet
- Fully open outbound firewall during troubleshooting
- Private storage account with created endpoints
- Updated NSGs for proper access
- Configured DNS
I can see the file share created after connection, and I've set environment variables that enforce routing over the VNET. It works once, and then the InternalServerError pops up every time afterward. I've tried restarting and rebuilding multiple times, using both Azure Firewall and a NAT gateway. Has anyone else experienced this? Or does anyone have a fully private setup with a function app and a private storage account?
3 Answers
Have you checked your diagnostic settings? They could give you more insight into the error. If you have a really simple function, does it stay consistent? Sometimes when you deploy something complicated, it can break. Also, ensure that your function's managed identity has the proper storage account permissions for the data plane.
It sounds like there might be something wrong with the deployment. I've seen issues like this before, and they often stem from a typo in an SQL connection string or a key vault variable. You'll want to dig into the logs to find out what the exact internal error is.
Yeah, it can be frustrating. These errors are usually related to storage networking issues, like a missing VNET link or unregistered private endpoints. If you're on a P0 plan, consider using the built-in storage that comes with it. It can save you from the hassle of dealing with an external Azure file share. Stop creating app settings for Azure file strings, and you'll find your deployments are much smoother while still keeping everything private.

Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically