{
  "id": 19129409,
  "title": "48-Hour Field Notes: My Free Server Kept Running — My Lease Expired Mid-Completion",
  "url": "https://urgent.news/2026/11/09/48-hour-field-notes-my-free-server-kept-running-my-lease-expired-mid",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-09T09:40:38.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/codepy_1473/48-hour-field-notes-my-free-server-kept-running-my-lease-expired-mid-completion-5gin"
  },
  "original_language": "en",
  "account": "In a 48-hour experiment, a small developer moved a worker onto a free server and set it up to access free model resources. The developer expected latency issues, but the real problem was that a long-running model call combined with a short lease period caused jobs to be completed but never properly owned. This led to double-counting in the system. The developer's setup consisted of a single SQLite file containing a job queue, a worker process that polled the queue, and each job calling a model to return structured JSON data. The developer made three assumptions that turned out to be incorrect: jobs have a state, a completed model call means the result is still needed, and inference being free means no need for a brake. The first issue was that the worker's lease outlived the job request, causing jobs to sit in the \"running\" state indefinitely. The developer added a lease with an expiry timestamp and a reaper to fix this, but this introduced a second bug. The reaper was correct, but the worker was not because the \"done\" state was not enforced via a database column. To fix this, the developer introduced a fencing token, which increments with each claim and must be presented with every write. If the fence does not match, the write fails and the job is removed as a zombie. The developer provided the entire SQLite-only code, including DDL, claim, complete, and heartbeat functions, as well as a test to demonstrate the issue.",
  "summary": "I spent 48 hours moving a small extraction worker onto a free server and pointing it at free model access, and I expected the interesting failure to be latency. It wasn't. The interesting failure was that a slow model call and a short lease are two clocks that nobody was reconciling, so my worker kept completing work it no longer owned and my queue kept double-counting it. Have you ever watched a…",
  "key_points": [
    "Developer ran a worker on a free server for 48 hours.",
    "Long-running model calls combined with short lease period caused issues.",
    "Introducing a lease with expiry and fencing token fixed the problem."
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}