E2B icon indicating copy to clipboard operation
E2B copied to clipboard

E2b is not honoring timeout

Open sumansaurabh opened this issue 6 months ago • 4 comments

Describe the bug I added a timeout for 24hrs, however it's not honoring the timeout and is getting reduced to 5 mins.

To Reproduce Steps to reproduce the behavior:

  1. Create a Sandbox add a timeout of 24hrs
  2. Sandbox gets evicted in 5 mins

Expected behavior Sandbox should wait for 24hrs before eviction

Browser console output Console logs from your browser's developer tool console.

Desktop (please complete the following information):

  • OS: [e.g. Mac]

sumansaurabh avatar Aug 27 '25 10:08 sumansaurabh

THis is happening in hobby account.

sumansaurabh avatar Aug 27 '25 11:08 sumansaurabh

Hey @sumansaurabh,

The hobby tier has a maximum timeout of 1 hour. You can find more here.

But it definitely shouldn't time out after 5 minutes.

Can you send me a reproducible example, please? Also, what version of SDK do you use?

jakubno avatar Aug 27 '25 13:08 jakubno

Can confirm that this issue exists in the following scenario on the Hobby tier:

  • First create sandbox with 1 hour timeout => Works OK, timeout set to 1 hour
  • Later connect to the sandbox with Sandbox.connect(sandboxId) with no timeout settings => this resets the timeout to 5 mins instead of maintaining it at 1 hours. This is the bug.
  • But, if you connect to the sandbox with Sandbox.connect(sandboxId) with 1 hour timeout setting => this keeps the sandbox alive for 1 hour
// First create sandbox with 1 hr timeout
const sandbox = await Sandbox.create(templateId, {
timeoutMs: 3_600_000,     // ✅ Timeout is set to 1 hour correctly
});


// Later connect to sandbox without any timeout settings
await Sandbox.connect(sandboxId) // ❌ Resets timeout to 5 mins

// But the issue doesn't arise if you connect to sandbox WITH timeout settings
await Sandbox.connect(sandboxId, {timeoutMs: 3_600_000 }) // ✅ Timeout maintained at 1 hr

sourav-bhar avatar Sep 26 '25 07:09 sourav-bhar