Subject: 500 Internal Server Error on Production Site
Description: Our production site is showing a "500 Internal Server Error" on every page, which is quite concerning. I noticed that the preview deployments from pull requests are working fine, so it seems limited to the production environment. I tried clearing the cache and redeploying, but the issue persists.
Kelechi Edeh10/16/2025, 12:50:46 PM
Hi Alex,
Thank you for reaching out, and i'm sorry to hear your production site is down. I understand this is urgent since its affecting your live environment. I'll help you get this resolved right away.
Customer10/16/2025, 12:50:56 PM
Thanks, I appreciate the quick response. Let me know what information you need from me to help diagnose the issue.
Kelechi Edeh10/16/2025, 1:14:39 PM
You mentioned that your preview deployments are working fine but the productions deployment isn't. This suggests the issue may be specific to your production environment configuration.
To help diagnose this efficiently, i need to gather some information
1. What is your Vercel project name or production deployment URL
2. When did this issue first start? Was there a deployment or change made before the errors began?
4. Can you check your runtime logs and share any error messages you see?
To check your runtime logs go to: Vercel Dashboard -> Your Project -> Deployments -> Click on your production environment -> Runtime Logs Tab
Customer10/16/2025, 1:14:44 PM
The issue started two days ago after we merged a "chore: bump deps & rotate db creds" change. Here's a snippet from the runtime logs:
```
2025-05-12T20:02:11.123Z ERROR PrismaClientInitializationError: Environment variable not found: DATABASE_URL
2025-05-12T20:05:23.789Z ERROR [GET] /api/users 500 Internal Server Error
```
Let me know if you need more details.
Kelechi Edeh10/16/2025, 1:47:48 PM
Hi Alex,
Thank you for sharing those logs. I can see the error in your runtime output.
The error logs confirms the issue is due to a missing or misconfigured environment variable "DATABASE_URL" in your production environment.
You mentioned that the issue began right after your recent merge, its very likely that the new credentials were not updated in Vercel's production configuration. Since you rotated your database credentials, make sure you have the new connection string.
Here's how we can resolve this quickly:
1. Update the variable in Vercel
Go to your Vecel Dashboard -> Your project -> Settings -> Environment Variables
Click "Add Another"
Select Production as the Environment
Set:
Key: "DATABASE_URL"
Value: <your production database connection string>
Save your changes
2. Redeploy your production build
Go to your latest production deployment
Click the three-dot menu (...) -> "Redeploy"
Once the redeployment is complete, please revisit your production site, the 500 errors should be resolved. If the issue persists or you encounter any new errors, please share the updated runtime logs and i'll be happy to assist you further
Customer10/16/2025, 1:47:51 PM
That makes sense, and I'm relieved to have a clear path forward. I'll update the `DATABASE_URL` in the production environment and redeploy. Thanks so much for your help!
Kelechi Edeh10/16/2025, 2:01:13 PM
You're very welcome, Alex! I'm glad we could identify the issue quickly.
Once you've updated the "DATABASE_URL" and redeployed, your production site should be back up and running smoothly.
For future deployments, when rotating credentials, its helpful to update environment variables in Vercel before merging code changes that depend on them. This will help prevent production downtime.
Feel free to confirm once everything is working or reach out if you need any additional assistance.
Customer10/16/2025, 2:01:16 PM
I'll definitely keep that in mind for future changes. Thanks again for your prompt help—I'll go ahead and make those updates now.