-
Hi! I'm having some issues understanding what's going on in my application. Yesterday we had to upgrade netlify functions quota to level 1 due to having used up 1.1M requests from 1st to 6th Apr. This was quite the surprise for us as we have some few functions that totally had run 4 times. I saw that in the ___netlify-handler function, the party was really going. Build Log1:07:21 PM: Build ready to start ___netlify-handler 10sec LogApr 6, 12:37:00 AM: 3499c246 Duration: 3.85 ms Memory Usage: 122 MB As you can see above, this is just a 10 second log from the ___netlify-handler function. My initial thought is that I have configured something wrong. We do use a lot of i18n things combined: We also use:
Please ask for more input/code if needed. Is it normal for this ___netlify-handler to have so many calls, and is it this(each of the log lines) that impacts our functions quota? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
I reverted adding the _middleware and that finally stopped the literal ddos of the ___netlify-handler function. Prefixing the default locale is not worth the cost of that 😅 I'm very interested in hearing why this happenes tho, and will it happen for all users adding this prefix? - If so, it should maybe be documented in the docs so people don't get a surprice-invoice 🥴 |
Beta Was this translation helpful? Give feedback.
-
TL;DR: We had Azure health propes scanning our site multiple times a second I finally found the issue. I thought it was the middleware that was causing this. I suddenly got a mail from netlify today again saying we've used up 70% of our 2mill function requests. Since we did not have middleware anymore, I had to go back to see what build caused these logs. It seems it was after I made changes to our root making it SSR instead of static. After some good debugging with a colleauge, we saw that the requests all came from Microsoft IPs. We also got the headers and eureka! We had some Azure Front Door things setup for some redirects. With theese, we also had health checks enabled... Hopefully this can be to help if it happenes to someone else. |
Beta Was this translation helpful? Give feedback.
TL;DR: We had Azure health propes scanning our site multiple times a second
I finally found the issue. I thought it was the middleware that was causing this. I suddenly got a mail from netlify today again saying we've used up 70% of our 2mill function requests. Since we did not have middleware anymore, I had to go back to see what build caused these logs. It seems it was after I made changes to our root making it SSR instead of static.
After some good debugging with a colleauge, we saw that the requests all came from Microsoft IPs. We also got the headers and eureka!
- The user-agent was "Edge Health Probe"
We had some Azure Front Door things setup for some redirects. With theese, we also…