packages/docs/docs/lambda/troubleshooting/debug.mdx
<Step>1</Step> Reproduce a render via the npx remotion lambda render command.
--props to pass in a JSON file with the same input props as the render you want to debug.--log=verbose to get detailed debugging information.There are four reasons renders may fail:
delayRender().If your code throws an error, you will see the error in the logs. If you are rendering via the CLI, the error will be symbolicated which can help you find the error in your code. Try to fix the error, redeploy the site and re-render.
If your error message reads that a delayRender() call timed out, a function has called delayRender() but did not call continueRender() within the timeout period. This is usually caused by a bug in your code. See Debugging timeout for more tips.
:::note
You can increase the timeout by passing timeoutInMilliseconds to renderMediaOnLamba() or passing --timeout to the CLI when rendering a video. Don't confuse it with the --timeout flag for the CLI when deploying a function (see below).
:::
If your error message reads that the main Lambda function has timed out, it means that the render was still ongoing, but the maximum execution duration of the Lambda function has been hit. This is caused by either:
--timeout to the CLI when deploying a function.<Step>1</Step> Get the Log URL:
--log=verbose to the command. This will print a CloudWatch link to the console.renderMediaOnLambda() add logLevel: "verbose" as an option. You will get a cloudWatchLogs field in the return value.Open this link and log into AWS if needed. A log stream will open.
By default, the filter is set to:
"method=renderer,renderId=[render-id]"
Tweak the query to find the logs of a specific chunk:
method=renderer,renderId=[render-id],chunk=12
will for example find the log stream of chunk 12. If your viewport is big enough, you will also see the chunk numbers in the summary view straight away.
Click the blue link in the Log stream name column to open the log stream. If you don't see any blue links, click "Display", then select "View in columns with details".
In the logstream, you will see debug logging from Remotion as well as any console.log statements from your React code.
Tweak the query to find the logs of the main function:
method=launch,renderId=[render-id]
You should get one result.
Click the blue link in the Log stream name column to open the log stream. If you don't see any blue links, click "Display", then select "View in columns with details".
To find which chunks failed to render, add --log=verbose to the Lambda render while rendering via the CLI.
Look for the link pointing to progress.json.
When using renderMediaOnLambda(), you will get a folderInS3Console field in the return value, which you can open and locate the progress.json file therein.
Within the progress.json file, you will find a chunks array.
The chunks that are missing are the ones that failed to render.
After you've identified which chunks are missing, inspect the logs for that chunk to find the cause of the error.
Note that two types of timeouts come into play in Remotion:
delayRender() timeout. This is the timeout that is defined using --timeout when calling npx remotion lambda render or using timeoutInMilliseconds when calling renderMediaOnLambda().--timeout when calling npx remotion lambda functions deploy or using timeoutInSeconds when calling deployFunction().You may report an issue on GitHub and Discord.
To share a reproducible render, share the progress.json that lies in the S3 folder of the failed render under renders/[render-id]/progress.json.
If you use renderMediaOnLambda(), this function returns a link folderInS3Console pointing you to the right location in the S3 console.
If you use npx remotion lambda render, add --log=verbose to print the link to the file in the S3 console.
If you include CloudWatch logs in your report, post the full logs (click "Load more messages" until there are no more to load.)