Skip to content

502 Timeout Error #592

Open
Open
@manavAt1flow

Description

@manavAt1flow

Getting Sandbox timeout errors all the time, could you please help me what can be wrong here?

import dotenv from 'dotenv'
import { Sandbox } from '@e2b/code-interpreter'

dotenv.config()

const sandbox = await Sandbox.create("code-interpreter-v1", {
    timeoutMs: 300000,
    requestTimeoutMs: 300000,
})

const execution = await sandbox.runCode('x = 1;x+=1; x')

console.log(execution.text)

Error Response

       return new import_e2b.TimeoutError(
               ^

TimeoutError: <html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.27.0</center>
</body>
</html>
: This error is likely due to sandbox timeout. You can modify the sandbox timeout by passing 'timeoutMs' when starting the sandbox or calling '.setTimeout' on the sandbox with the desired timeout.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions