Skip to main content

Duration and extending

Every GPU instance launches with an estimated duration (minimum 1 hour). That duration is a commitment, not a hint — when it elapses, the instance auto-terminates and the unused portion of the credit hold is refunded.

If you want to keep running past the originally scheduled end, hit Extend before (or ideally well before) expiry.

How auto-stop works

At launch, EcoLink places a credit hold for the full estimated_duration_hours × hourly_rate × gpu_count. Example: 1 GPU × $1.60/h × 2 hours = $3.20 held.

When now >= started_at + estimated_duration_hours:

  1. The billing cycle worker CAS-flips the instance to terminating_requested and enqueues a terminate job.
  2. The executor kills the pod, runs finalizeInstance to settle the hold:
    • If you ran less than you paid for: refund the difference to your balance.
    • If you ran slightly over (watchdog lag of up to ~1 min can happen): tiny overage charged.
  3. Instance status flips to terminated, termination_reason='duration_expired'.
  4. You get a notification: "Instance terminated — duration reached."

Warnings before auto-stop

EcoLink sends in-app notifications as the duration approaches:

  • 30 min before — warning severity
  • 20 min before — warning
  • 10 min before — critical
  • 5 min before — critical
  • 1 min before — critical

Notifications show as a red dot on the bell icon in the console top bar. Click to see the instance and the Extend button.

Extending

From the console

  1. Open the instance detail page.
  2. Click Extend.
  3. Choose how many additional hours (1 hour minimum).
  4. Confirm.

The platform places an additional hold for hours × hourly_rate × gpu_count. If your balance can't cover it, the extend fails with 402 and the instance still terminates at the original deadline.

From the API

curl https://api.ecohash.com/gpu-instances/142/extend \
-X POST \
-H "Authorization: Bearer eco_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{ "hours": 3 }'

Response:

{
"additional_cost": 4.80,
"new_balance": 83.15
}

The new estimated deadline is started_at + (original_duration + extend_hours).

Can I extend after the instance already terminated?

No. Once status = terminated, the instance is gone — you can't revive it. Launch a new one (same container image, attach the same drive if you want your files back).

How do I know when it will expire?

  • The instance list shows elapsed time and remaining duration for each running instance.
  • The detail page shows a countdown.
  • Notifications fire automatically at the thresholds above.

What if I want it to run indefinitely?

There's no "indefinite" option for GPU instances — they're dev environments, and running forever is usually accidental. Two workarounds:

  1. Launch with a long duration upfront (e.g., 72 hours), and extend before each expiry as needed. The hold is larger but unused portion refunds.
  2. Use a user inference instance instead — those DO run until your balance runs out, because they're production serving endpoints, not dev environments.

If your actual need is "keep a long-running training job alive," the common pattern is:

  • Attach a cloud drive with your code + checkpoints
  • Launch with 24h duration
  • Run tmux new -s train then python train.py --checkpoint-every 1h
  • Extend before expiry
  • If expiry sneaks past you, the next instance you launch re-reads the checkpoint and continues

Pricing note

Holds are prepaid — at launch and on extend. The hold comes out of your available balance immediately, but it's not spent until time elapses. When the instance terminates, the unused portion refunds back, so economically you only pay for actual uptime.

See How billing works for the full mechanism.