NextJS ISR doesn't work, ERROR Task timed out after 10.01 seconds

Hello, community.

My site: https://main--endearing-quokka-f5c4e2.netlify.app/

I’m using Headless Wordpress with GrapgQL to request content.

I am developing a small site with with some amount of static and dynamic pages. This is my first site on this stack.

Locally I have the production build working well, the content is updated when i update it in Wordpress. But on Netlify I see a problem that as content is updated in the CMS it is not updated on the site or is updated very rarely. Spent 2 days researching the issue. Today I came across errors like ERROR Task timed out after 10.01 seconds

Now my hypothesis is that when the page in the background tries to rebuild, it lacks the allotted 10 seconds, so the process crashes and the updated page with new content does not appear. Is it so?

If so, the most interesting thing is how to fix it. It looks strange to me that a minimal site with few pages is immediately hindered by a resource problem. Usually on the localhost everything runs long, and on the server quickly, but here the situation is the opposite.

Will it help me to switch to a pro account? How can I measure how many seconds are spent on background operations to know whether enlarged 26-second limit is enough or not? How else can I affect the execution time of background functions?

Hi Edward!

I think you’re already trying the pro trial out, so we can extend your functions timeout if you want - up to 26 seconds max. Let me know which site you’d like that set on, if you want to try it!

However, we really recommend that you instead optimize your functions so they run faster in the first place :slight_smile: This guide has some good suggestions:

Take a look and let me know what you think.