After deploying our site we seem to be consistently getting generic ‘This edge function has crashed’ errors on all pages, they hang for a while and finally return an error page. After a few minutes all pages work fine. Could that be a cold start issue at the edge? We are getting nothing at in the edge function log.
I’ve had the exact same experience a couple of weeks back. In my function, setting a cookie didn’t work, and the rest of the function relied on it. Not sure if that’s the case with yours, but if so, I’d start there.
Thanks for your reply. So in your case, you had the same issue with every page crashing for a few minutes and then working fine with absolutely no change on your end?
We’re losing our minds right now. We’re one week from release and this is blocking our entire launch. All the pressure is on me to get this right and questioning my vendor choice with Netlify. The log gives me nothing - if the page renders all edge functions log to the console just fine, if it doesn’t I get no error at all. Can’t be reproduced locally. And zero response from support. This is nuts.
As I’m typing the site is rendering and logging when viewed from Arizona. Where I am in Panama, I get this:
This edge function has crashed
An unhandled error in the function code triggered the following message:
Yes, that was just about the case. The function was working fine on localhost (ntl dev) but it wasn’t working in production. Sometimes, after switching urls, all of the sudden a page would show up. I was just testing some potential use case and abandoned the idea after a few hours. Guess edge functions are still in beta for a reason.
OK thanks. I see what you’re saying, but after making a big announcement 6 months ago, making the beta publicly available, with a ton of marketing content advertising the feature, and actually charging customers for its use, for Netlify to hide behind the ‘Beta’ label as an excuse for the entire service to be unreliable to the point of being unusable is just unacceptable. Right now we are completely screwed.
I could add you to the repo, we actually have a few edge functions, too much code to paste here, but honestly I’m afraid it would me a waste of your time. As I’m browsing now, behavior is completely erratic, the same exact page loads in 150ms a few times, then crashes a few times with a generic edge function error, then works again just fine, just by refreshing the page. No errors in log. No idea which function is crashing. Nothing to debug or trace. And errors can’t be reproduced locally using Netlify CLI.
Here’s the 11ty edge function, that’s the one that does the most work. We’ve alreadyoptimized the 11ty Edge generated file to be as small as possible, 45KB.
@slegay, I’m sorry, but I’m going to have to ask you to calm down. As I’ve mentioned in your helpdesk thread, opening multiple issues, posting on various places, is not going to help! Your frustration is valid, but at the moment, by posting about the same issue on multiple places, you’re not achieving anything - your actual issue at hand is not getting resolved.
Apart from these threads, you have also left feedback in Netlify Docs. All of this has been noted, and you might feel better to know that Product Manager of Edge Functions has also looked over your feedback. So, this situation will change - sooner or later.
About this, let me give you some context:
Netlify had started working on Edge Handlers since 2020. We had spent a lot of engineering effort into making that, there were private betas going on, but in the end, the product failed. We ran into too many issues with that, and had to call it off. Instead, we started from scratch for this another attempt at the same functionality and this time, it worked. This was a big win for the company and it was celebrated with high levels of marketing, advertising, etc.
We’ve so many other beta features - Prerendering, Split Testing, etc. There’s a reason why we’re calling a feature, beta - because it’s not tested for production work loads, there are chances to fail. If that’s not understood by this point, I’m sorry, but I’m not sure what more to say. You can call that an excuse, but by ignoring the warning of a beta feature (and Eleventy itself saying that their Netlify Edge setup is also experimental), you’re choosing to dive into a risk factor.
You’ve also been complaining about we charging for that feature. Can you please let us know, how much we’ve charged you in your past 6 months for Edge Functions? I’m willing to bet, that’s $0! Please stop spreading incorrect information. On the Pro plan that you’re, you’re getting 15m invocations for free, are you actually saying you ran out of those and got charged?
Calm down? What part of my post was inflammatory? We have a site that can’t be launched, and no indication as to why that is the case, or how to work around the issue. Anyone would be stressed in this situation.
Regarding my comment about charging for the feature, this wasn’t about dollars spent. You are correct, since we haven’t launched yet, the feature has cost us nothing. But seeing pricing information on the feature gave me a false sense of comfort, thinking it was overall ready to use outside of a few kinks.
At this point I would happily pay $ 1,000 / mo to get this launched. Would upgrading to Enterprise solve this issue? I read that your Enterprise customers run on a separate edge network, would edge functions be more reliable there?
Thank you so much. Since 11ty Edge was the root of the issue last time we experienced crashes, and since it’s the one doing the most work as far as CPU and memory footprint, I think as a first step we’re going to remove the 11ty Edge function altogether and replace those blocks with client-side logic, but keep all other edge functions handling access control and routing of requests based on user state. Those are very small and fast, hopefully that’ll help.
Removing 11ty Edge function seemed promising, we did not experience any of those errors for over 24 hours afterwards, but today it started happening again when browsing in Arizona. Can’t reproduce here in Panama but I received these screenshots from team members in AZ.
Thank you for those. These errors are not unique to your site. The devs have already engaged into discussions with the upstream provider on how to make this better. There is a lot of work going on into improving the logging experience at the moment, so hopefully, next time this happens, you can see the error yourself (or at least we can see some useful error message in our logs) - none of which is happening at the moment.
Thanks so much for following up. I want to assure you we are actively investigating this and will follow up on this thread when we have more information.
We have identified a problem residing in an upstream service that is causing these timeouts. Presently we are working with the provider on this issue and are waiting for a code fix from them. We apologize for the inconvenience and are doing as much as we can to aid the provider in the restoration of service.