hi there maksym,
that’s the default timeout for our functions - we can bump it up to a maximum of 26 seconds for Pro customers, so if you’d like us to to that just let us know when you have upgraded to Pro tier.
does it mean that the only option I have is to stop using this plugin (because it is giving me very little control about the functions that I generate) and use something of my own?
or can I do it on netlify.toml/config or netlify-plugin-nextjs level?
another question is:
is it possible to see the logs which can tell me the cause problem?
does Netlify has such tracking of such issues?
where I can see the place where such errors happen.
and where I can see how often it happens (how many timeouts for some period of time).
Another solution other than waiting for answers is to read the documentation and search for similar threads on the forums. But, here you go:
Logs are visible in your Site dashboard > Functions > Depending on which resource it is, it could be either of the three generated functions. You would have to add additional debug logs like console.time() to see what’s causing issues.
Not sure what you mean by that. The answer could be same as above, your function logs.
Just to be clear, I wasn’t mentioning about not asking us questions, I simply thought, instead of waiting and asking if there are some updates, you could probably find an answer faster if you search. But if you prefer waiting, it’s up to you. We’ll eventually get to your question too.
Not precisely. Here’s a better guide about console.time() than my explanations. In short, it would work like:
Basically, you’d have to add the timers around your function calls and processes to see which one exactly took longer. So if your timer named task2 took 8 seconds but you expect it to take less, you know where to debug.
Isn’t that an acceptable time frame to debug the functions? We used to have those for 1 hour previously. 7 days seems like a big upgrade and should be enough to help you print and debug what’s happening with your functions. Happy to file a feature request to raise that limit even more, but it won’t be changing in the short term.
Having a custom plugin or function is not going to be a viable solution, in my opinion. You’d basically have to fork our plugin (or write your version from the scratch), make the necessary changes and use it. We won’t be able to provide support for that.
What you could do however is, you could add a setTimeout() function which would redirect you to some other page before the function times out. So if you’ve a time limit of 10 seconds, you can add the setTimeout() for 9 seconds. If the function completes without 9 seconds, you’d get your rendered output, if it takes more than 9 seconds, setTimeout() will fire and redirect it to somewhere else.