run
run copied to clipboard
Netlify Adapter: "This edge function has crashed" on certain pages receiving a lot of load
Deploying to Netlify using the Netlify adapter. This error appears on a page that has a +middleware to fetch data from an external API. The error only appears when I visit the page many times in quick succession. I can get this error consistently by refreshing the page many times in a row.
The confusing part is the +middleware in question is wrapped in a try/catch, and the catch is simply returning a response with a 500 error code (which is what I want to happen). The Netlify logs do not point to any specific line or anything that is causing the error so I am just assuming the error is originating from this +middleware. Below is the error that I see in the Netlify logs.