Hello Community,
I am facing a critical network error on my Next.js App Router application hosted on Vercel. This issue persists despite extensive code-level fixes.
Observed Problem Behavior:
-
Error Messages: On initial access, the browser consistently throws “The connection for this site is not secure” and “ERR_CONNECTION_RESET” errors.
-
Consistency: The problem is not isolated to my local network; the error also occurs when accessing the site via cellular data.
-
Anomaly: The application only loads successfully after 5-7 continuous page refreshes. This suggests the initial attempts are being blocked or reset by the Vercel Edge.
Controls and Code Fixes Applied:
-
Logs: Vercel logs show no deployment errors, and there is no visible error in the domain configuration.
-
MongoDB: Implemented the Global Cache (Connection Pooling) pattern and robust
try...catcherror handling for database connection. Mongoose timeouts were increased to 15 seconds. -
Network Evidence: My Vercel CLI outputs showed the “Exceeded query duration limit of 5 minutes” warning during the initial failure attempts.
-
Security: All packages (Next.js 15.5.7, React 19.2.1) are updated to the latest patched versions.
-
Vercel KB Review: I reviewed the article
How do I resolve "ERR_SSL_PROTOCOL_ERROR" with Vercel?but the behavior appears less like an ISP block and more like a Serverless/Edge network conflict that resets the connection during the initial cold start response.
Question: Since the application code is robust (it catches DB errors and returns a clean HTML), why is the connection consistently being reset either by the Vercel Edge Network or during the Serverless Function’s initial response? Could this be related to a security policy or an infrastructure conflict on the Vercel side?
Relevant Deployment URL: rsinternationalstudy.vercel.app