E2b is not honoring timeout
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:
- Create a Sandbox add a timeout of 24hrs
- 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]
THis is happening in hobby account.
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?
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