Skip to content

Commit 9b3971d

Browse files
committed
increase sandbox timeout
1 parent af1464f commit 9b3971d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/components/src/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1400,7 +1400,7 @@ export const executeJavaScriptCode = async (
14001400
nodeVMOptions?: ICommonObject
14011401
} = {}
14021402
): Promise<any> => {
1403-
const { timeout = 10000, useSandbox = true, streamOutput, libraries = [], nodeVMOptions = {} } = options
1403+
const { timeout = 300000, useSandbox = true, streamOutput, libraries = [], nodeVMOptions = {} } = options
14041404
const shouldUseSandbox = useSandbox && process.env.E2B_APIKEY
14051405

14061406
if (shouldUseSandbox) {
@@ -1458,7 +1458,7 @@ export const executeJavaScriptCode = async (
14581458
}
14591459
}
14601460

1461-
const sbx = await Sandbox.create({ apiKey: process.env.E2B_APIKEY })
1461+
const sbx = await Sandbox.create({ apiKey: process.env.E2B_APIKEY, timeoutMs: timeout })
14621462

14631463
// Install libraries
14641464
for (const library of libraries) {

0 commit comments

Comments
 (0)