🎥 Make videos programmatically with React
add "timed out evaluating page function" documentation
Jonny Burgerbc5954f066d3
diff --git a/packages/docs/docs/cli/render.md b/packages/docs/docs/cli/render.mdindex 5846ec8f11..ffbffdcecc 100644--- a/packages/docs/docs/cli/render.md+++ b/packages/docs/docs/cli/render.md@@ -165,7 +165,9 @@ For example only every second frame, every third frame and so on. Only works for[Define the location of the `public/` directory.](/docs/config#setpublicdir). If not defined, Remotion will assume the location is the `public` folder in your Remotion root.-### `--ffmpeg-executable`+### `--timeout`++Define how long a single frame may take to resolve all [`delayRender()`](/docs/delay-render) calls [before it times out](/docs/timeout) in milliseconds. Default: `30000`.:::infoNot to be confused with the [`--timeout` flag when deploying a Lambda function](/docs/lambda/cli/functions#--timeout).diff --git a/packages/docs/docs/timeout.md b/packages/docs/docs/timeout.mdindex 8f0ccb73dd..bcf972f4b4 100644--- a/packages/docs/docs/timeout.md+++ b/packages/docs/docs/timeout.md@@ -99,3 +99,4 @@ Uncaught Error: A delayRender() "Fetching data from API..." was called but not c- [delayRender()](/docs/delay-render)- [Data fetching](/docs/data-fetching)- [Loading Root Component Timeout](/docs/troubleshooting/loading-root-component)+- ["Timed out evaluating page function"](/docs/troubleshooting/timed-out-page-function)diff --git a/packages/docs/docs/troubleshooting/timed-out-page-function.md b/packages/docs/docs/troubleshooting/timed-out-page-function.mdnew file mode 100644index 0000000000..0a6588d8e9--- /dev/null+++ b/packages/docs/docs/troubleshooting/timed-out-page-function.md@@ -0,0 +1,30 @@+---+image: /generated/articles-docs-troubleshooting-timed-out-page-function.png+title: "Timed out evaluating page function"+sidebar_label: Timed out evaluating page function+crumb: "Troubleshooting"+---++The error message "Timed out evaluating page function"++```+Error: Timed out evaluating page function (f, c) => {+ window.remotion_setFrame(f, c);+}+```++generally happens if the Remotion renderer is trying to send a JavaScript command to the browser, but the browser does not respond to it within the timeout (before `v4.0.73`: 5 second, from `v4.0.73`: the [`--timeout`](/docs/cli/render#--timeout) flag, by default 30 seconds).++This means that the browser is hanging due to CPU and memory overload. It does not imply that a [`delayRender()`](/docs/delay-render) was not cleared.++To resolve this, consider:++- Decreasing the [`--concurrency`](/docs/cli/render#--concurrency) of the render+- Measuring memory and CPU usage of your render and adding more resources to it+- Increasing the [`--timeout`](/docs/cli/render#--timeout) flag+- Looking for ways to speed up your JavaScript code+ - Watch out for infinite loops in your code and [debug your render](/docs/troubleshooting/debug-failed-render)++## See also++- [Debugging timeouts](/docs/timeout)diff --git a/packages/docs/sidebars.js b/packages/docs/sidebars.jsindex 09cb09516e..9841d16703 100644--- a/packages/docs/sidebars.js+++ b/packages/docs/sidebars.js@@ -702,6 +702,7 @@ module.exports = {"troubleshooting/defaultprops-too-big","troubleshooting/could-not-be-parsed-as-a-value-list","troubleshooting/broken-fast-refresh",+ "troubleshooting/timed-out-page-function",],},{diff --git a/packages/docs/src/data/articles.ts b/packages/docs/src/data/articles.tsindex 3953dcb977..ffbe1b8771 100644--- a/packages/docs/src/data/articles.ts+++ b/packages/docs/src/data/articles.ts@@ -2675,6 +2675,13 @@ export const articles = [compId: "articles-docs-troubleshooting-rosetta",crumb: "Troubleshooting",},+ {+ id: "troubleshooting/timed-out-page-function",+ title: "Timed out evaluating page function",+ relativePath: "docs/troubleshooting/timed-out-page-function.md",+ compId: "articles-docs-troubleshooting-timed-out-page-function",+ crumb: "Troubleshooting",+ },{id: "player-flicker",title: "Avoiding flickering in <Player>",diff --git a/packages/docs/static/generated/articles-docs-troubleshooting-timed-out-page-function.png b/packages/docs/static/generated/articles-docs-troubleshooting-timed-out-page-function.pngnew file mode 100644index 0000000000..609beb04d2Binary files /dev/null and b/packages/docs/static/generated/articles-docs-troubleshooting-timed-out-page-function.png differ