Spaces:
Paused
Download FIX-DISASTER.md from 2Btainment/repospace: direct link, hf CLI and curl.
- Browser
- Download file 4.47 kB
-
https://huggingface.co/spaces/2Btainment/repospace/resolve/main/FIX-DISASTER.md
- Command line
-
hf download hf://spaces/2Btainment/repospace/FIX-DISASTER.md
-
curl -L -o FIX-DISASTER.md https://huggingface.co/spaces/2Btainment/repospace/resolve/main/FIX-DISASTER.md
RepoSpace — FIX-DISASTER
Date: 2026-10-03 17:40 PT (Europe/Berlin)
Space: https://huggingface.co/spaces/2Btainment/repospace
App: https://2btainment-repospace.hf.space
Verified runtime / Space commit: 20df9002264cec9e184389a3d45c09b7fc4e2471
Local git fix commit: c46ea3a817864c68aedec3b9a70c1fff23cf0812
Stage when verified: RUNNING (replica after this build; Python 3.12.15, Node 22.23.3)
What users actually hit
The landing page was fine (dark Einswarm UI, GET / 200). The preview loop was not.
Every Node repo died during
npm install. A 1024 MBRLIMIT_ASwas applied to the sandbox. V8 aborts when it cannot reserve virtual address space, even if RSS is ~10 MB. Live log fromheroku/node-js-getting-startedon the previous revision:FATAL ERROR: NewSpace::EnsureCurrentCapacity Allocation failed - JavaScript heap out of memorythenRuntimeError: npm install failed with code -6(SIGABRT). Status wentfailed. The iframe never appeared.Many non-static repos showed the wrong page (or a blank shell). Detection served the first nested
index.htmlit found.heroku/python-getting-started(Django) was markedrunning/staticbecause ofhello/templates/index.html. The iframe returned HTTP 200 of the raw template ({% extends "base.html" %}), not the app. The same early check treated CRA/Vitepublic/index.htmlas a finished site, so the preview was an empty shell instead ofnpm install+ build.False 429 on create after a restart. SQLite rows left in
pending/building/runningstill counted towardMAX_CONCURRENT_SESSIONSeven when no process existed.POST /api/sessionsmapped that to 429Too many concurrent sessions. Status/log polls were already on a separate 600/min budget (previous commit); a 25-request burst on this build stayed 200.
Fix
- Do not set
RLIMIT_ASunlessREPOSPACE_AS_MBis at least 4096. Default is off. Wall-clock build/start timeouts still apply. CPU rlimit default is off so a live server is not SIGXCPU'd. - Detect order: prebuilt
dist/build/out/only, thenpackage.json, then Python (includingmanage.py), then a real staticindex.html. Skiptemplates/,public/when a Node app exists, and HTML that contains{%,{{, or<?php. - Python deps install into a per-session venv (
.repospace-venv), not the control-plane interpreter. Django runsmigrate --noinputthenrunserver. - On startup, stale sqlite rows with no live process are marked
terminated. Concurrency is counted from in-memory sessions. - Image: Python 3.12 + Node 22. UI stops status/log polling once the session is
failedorterminated. - Space repo junk (committed
.venv,.pytest_cache,frontend/node_modules) removed in the same upload so the Docker context is the app, not a virtualenv.
What now works (live, this revision)
| Check | Result |
|---|---|
GET / landing |
200, background rgb(2,2,2), Einswarm dark/gold |
GET /api/health |
200 service=repospace |
POST mdn/beginner-html-site-styled |
pending → running static |
GET /s/{id}/ static body |
HTTP 200, My test page / Mozilla is cool, Python SimpleHTTP 3.12 |
| Visible iframe | Playwright: iframe 1372×707, body text starts "Mozilla is cool" |
POST heroku/node-js-getting-started |
running node; npm install added 345 packages; HTTP 200 HTML titled "Node.js Getting Started on Heroku" (X-Powered-By: Express) |
POST shekhargulati/python-flask-docker-hello-world |
venv + pip + flask run; HTTP 200 body Flask inside Docker!! |
25× GET /api/sessions/{id} |
25× 200, zero 429 |
GET .../logs |
200 |
DELETE /api/sessions/{id} |
200 terminated; following GET /s/{id}/ 404 |
Remaining limits
- No Firecracker, no Docker-in-Docker. Dockerfile-only repos still fail with an explicit unsupported error.
- Next.js full servers are still rejected on purpose (too heavy for this sandbox).
- Django/Flask apps that need Postgres, env secrets, or a Python newer than 3.12 will fail in the log; we do not pretend otherwise.
- cpu-basic, max 3 concurrent sessions, 15 min idle teardown, 60 min hard cap.
- One shared network namespace. Soft timeouts only; address-space cap is off so a huge install can still OOM the whole Space.
- Heroku Node sample warns
EBADENGINE(wants npm 12; image has npm 10.9 with Node 22) but still installs and serves.