I got a message saying I’m at 90% function invocation. I’m new to nextjs (which is what I’m using) and I’m not sure how that happened. I suspect it’s some _middleware I just put in, but I don’t know how it spiked so much. (My understanding is that that would only happen on requests and it seems unlikely there were 100K to my little site.)
Are there logs I can make/look at to try to see what’s up?
I’ve pulled out the middleware files and as far as I know, I don’t have any other functions running. But I’m still seeing what I think are invocations on this page (which is what I was looking for in the original post, I think):
There are constant log hits that look like this:
12:57:43 PM: db945b2d Duration: 3.46 ms Memory Usage: 102 MB
12:58:09 PM: 8418575a Duration: 4.52 ms Memory Usage: 102 MB
12:58:10 PM: 7f525ba4 Duration: 3.88 ms Memory Usage: 102 MB
12:58:11 PM: 6ed7ff4e Duration: 4.60 ms Memory Usage: 102 MB
12:58:12 PM: 192ab17c Duration: 3.46 ms Memory Usage: 102 MB
12:58:13 PM: 921796c4 Duration: 7.93 ms Memory Usage: 102 MB
12:58:39 PM: 68511384 Duration: 3.49 ms Memory Usage: 102 MB
12:58:41 PM: 4aee1615 Duration: 3.41 ms Memory Usage: 102 MB
12:58:42 PM: 563447bc Duration: 3.27 ms Memory Usage: 102 MB
I added a DEBUG env variable with a * value to see if more info would show up, but nothing changed.
I have no idea what could be causing behavior.
If it matters, my site is built off this starter from cassidoo:
Any ideas?
a
P.S. I did a clear cache and re-deploy thing too but that didn’t clear the issue.
Do you use any dynamic rendering? That is all function driven, so if you do, we’ll be creating functions to do the rendering for you, and running them automatically.
I don’t think so. And, to make sure. I took everything off the site except an pages/index.js file with nothing but a single div with placeholder text and still saw the function firing.
It wasn’t as frequent as when the full site was live, but it was still going.
Hi @TheIdOfAlan ,
Yes, that is expected behavior. Every SSR page will hit the handler. Currently, in the beta plugin every page hits the function, even static ones, though this will change so that static pages will be served from the CDN. You can enable that now by setting the env var EXPERIMENTAL_MOVE_STATIC_PAGES