Nuxt 3 SSR Project Invocation Failed error

#nuxt 3 SSR Project Access Issue

Description:

Hello,

I have deployed my Nuxt 3 SSR project to Netlify. Although the deployment process shows as "success ", I cannot access the project. The error message is "Invocation Failed " and includes a "This function has crashed " error. Error details:

  • Error Message: This function has crashed
  • Error Reason: LambdaTimeout
  • Date and Time: 2024-02-20T21:16:52.968Z
  • Task ID: 84f61129-7e9f-43e8-acf6-417a576e22ae
  • Netlify Internal ID: 01HQ461JA6TKKWD6WTHBX13QWW

Additional Information:

  • Nuxt 3 version: “nuxt”: “^3.10.0”,
  • Netlify plan: Pro
  • Project URL: Project URL

Feb 21, 10:22:32 AM: INIT_START Runtime Version: nodejs:18.v20 Runtime Version ARN: arn:aws:lambda:us-east-2::runtime:a993d90ea43647b82f490a45d7ddd96b557b916a30128d9dcab5f4972911ec0f
Feb 21, 10:22:42 AM: 04202603 ERROR Task timed out after 10.05 seconds
Feb 21, 10:22:42 AM: 04202603 Duration: 10051.10 ms Memory Usage: 421 MB Init Duration: 257.74 ms
Feb 21, 10:22:42 AM: INIT_START Runtime Version: nodejs:18.v20 Runtime Version ARN: arn:aws:lambda:us-east-2::runtime:a993d90ea43647b82f490a45d7ddd96b557b916a30128d9dcab5f4972911ec0f
Feb 21, 10:23:14 AM: 351fe247 ERROR Task timed out after 10.05 seconds
Feb 21, 10:23:14 AM: 351fe247 Duration: 10050.48 ms Memory Usage: 369 MB
Feb 21, 10:23:14 AM: INIT_START Runtime Version: nodejs:18.v20 Runtime Version ARN: arn:aws:lambda:us-east-2::runtime:a993d90ea43647b82f490a45d7ddd96b557b916a30128d9dcab5f4972911ec0f

Please assist me in resolving this issue. Provide me with the necessary steps and solutions to access the project.

Thank you,

Hello, thank you for your answer.

I had read the content you shared before creating this request. I am using Netlify Functions for my NUXT project and I cannot log which request or page is causing the delay in the process that should take 10 seconds. I don’t know exactly how to understand which function is delayed at which stage in the SSR project during the execution period.
I saw in another answer that they extended the Timeout period, is it possible to achieve this?

Here

The page that you’re having troubles loading would the page you need to debug. For example:

<script setup lang=ts">
  console.time('id')
  const { data: count } = await useFetch('/api/count')
  console.timeEnd('id')
</script>

Or if you’re having troubles in the API route itself, add the logs there.

Extending the timeout is always possible, but it’s not the solution, more like a band-aid. If your page takes 10 seconds or more to load, I think you should make sure the page loads faster instead of ensuring it loads fine in 26 seconds.