Previewing Content in Contentful causes 10s timeout

We have a project built on Contentful & Next.js, there are certain entries where when we attempt to preview the entry we get “The Function has Crashed” with a 10s timeout. When I view the function log there are only 2 lines. One details the Duration and Memory Usage and the other one just reads ERROR Task timed out after 10.02 seconds.

Is there a way to understand what Function is actually timing out? Or, can we try increasing the timeout?

hi Mike,

can you tell me which site this is regarding? if you are on Pro team or higher, we can increase your functions timeout to 26 seconds which should fix the issue you are seeing. Let me know!

Hi Perry! Thanks for the quick reply, this is for the “metrie-staging” project ID: 4a507962-a470-4a69-8aca-83d3ae4aeaff

done and done. I love it when we get to help quickly! you are now at 26 seconds.

Let us know if this fixes the problem?

Thanks Perry! Just for clarity, does this require a re-build or will it take time to propagate? I’m still getting the 10.02s timeout and just want to be sure.

it should not take a rebuild - it used to, but we changed the process to not require that.

I’d wait ~5-10 minutes and try again, if no dice, please let me know and i will take another look.

1 Like

I have this problem too.

as for the sites above, we’ll need to know which site or which account you have, so we can extend your functions timeout, @enrique.casanova :slight_smile:

Thanks @perry

Site ID: 38842b74-2906-48e1-95a9-07e52eccdc13

hi there @enrique.casanova , you’re now at 26 seconds!

@perry thanks so much!!

1 Like