Skip to content

[Bug]: __netlify-handler function times out #1174

@Shubham510

Description

@Shubham510

Summary

After upgrading from version 3.9 to 4.2.1, the site builds properly but after when visiting the page, it times out and gets a 502 error from the __netlify-handler function. It gives back the following error -

{"errorMessage":"2022-01-28T15:53:17.566Z dcfe2e2a-53a5-44ef-a864-61fd6b598654 Task timed out after 10.01 seconds"}

The same version of the code was working fine with the version 3.9. The logs for __netlify-handler only show a timeout error and there is no other info which can be used for debugging.

Steps to reproduce

.

A link to a reproduction repository

No response

Plugin version

4.2.1

More information about your build

  • I am building using the CLI
  • I am building using file-based configuration (netlify.toml)

What OS are you using?

No response

Your netlify.toml file

`netlify.toml`
[build]
    command = "npm run build"
    publish = ".next"

[context.production]
    environment = {NEXT_PUBLIC_API_URL=""}

[context.deploy-preview]
    environment = {NEXT_PUBLIC_API_URL=""}


[[plugins]] 
    package = "netlify-plugin-cypress"

[[plugins]]
package = "@netlify/plugin-nextjs"

[build.environment]
CYPRESS_CACHE_FOLDER = "../node_modules/.CypressBinary"
TERM = "xterm"

Your public/_redirects file

`_redirects`
# Paste content of your `_redirects` file here

Your next.config.js file

`next.config.js`
# Paste content of your `next.config.js` file here. Check there is no private info in there.

Builds logs (or link to your logs)

Build logs
# Paste logs here

Function logs

Function logs
8:09:12 PM 5e752d92 Duration: 10008.16 ms	Memory Usage: 275 MB	Init Duration: 186.18 ms
8:09:12 PM 5e752d92 ERROR  Task timed out after 10.01 seconds
8:09:21 PM 7b5ea894 Duration: 10007.95 ms	Memory Usage: 271 MB	Init Duration: 211.42 ms
8:09:21 PM 7b5ea894 ERROR  Task timed out after 10.01 seconds
8:51:25 PM e17c41f2 Duration: 10008.26 ms	Memory Usage: 271 MB	Init Duration: 229.31 ms
8:51:25 PM e17c41f2 ERROR  Task timed out after 10.01 seconds

.next JSON files

generated .next JSON files
# Paste file contents here. Please check there isn't any private info in them
# You can either build locally, or download the deploy from Netlify by clicking the arrow next to the deploy time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugcode to address defects in shipped code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions