{"record":{"id":"e85ef7cf2d8559b3","repo":"windmill-labs/windmill","slug":"could-not-create-initial-worker-dir","errorCode":null,"errorMessage":"could not create initial worker dir","messagePattern":"could not create initial worker dir","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"backend/src/main.rs","lineNumber":2332,"sourceCode":"        &*PY312_CACHE_DIR,\n        &*PY313_CACHE_DIR,\n        &*BUN_BUNDLE_CACHE_DIR,\n        &*GO_CACHE_DIR,\n        &*GO_BIN_CACHE_DIR,\n        &*RUST_CACHE_DIR,\n        &*CSHARP_CACHE_DIR,\n        &*NU_CACHE_DIR,\n        &*HUB_CACHE_DIR,\n        &*POWERSHELL_CACHE_DIR,\n        &*JAVA_CACHE_DIR,\n        &*RUBY_CACHE_DIR,\n        &*R_CACHE_DIR,\n        &*TAR_JAVA_CACHE_DIR, // for related places search: ADD_NEW_LANG\n    ] {\n        DirBuilder::new()\n            .recursive(true)\n            .create(x)\n            .expect(\"could not create initial worker dir\");\n    }\n\n    tracing::info!(\n        \"Starting {num_workers} workers and SLEEP_QUEUE={}ms\",\n        windmill_worker::sleep_queue()\n    );\n\n    for i in 1..(num_workers + 1) {\n        let wk_conf = &workers[i as usize - 1];\n        let conn1 = wk_conf.conn.clone();\n        let worker_name = wk_conf.worker_name.clone();\n        WORKERS_NAMES.write().await.push(worker_name.clone());\n        let rx = killpill_rxs.pop().unwrap();\n        let tx = tx.clone();\n        let base_internal_url = base_internal_url.clone();\n        let hostname = hostname.clone();\n\n        handles.push(tokio::spawn(async move {","sourceCodeStart":2314,"sourceCodeEnd":2350,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/backend/src/main.rs#L2314-L2350","documentation":"Startup panic in run_workers: DirBuilder::create().expect() failed while creating one of the language cache directories (PY312/PY313/BUN/GO/RUST/CSHARP/NU/HUB/POWERSHELL/JAVA/RUBY/R caches, etc.). It is a fatal, process-aborting environment error — the cache root is unwritable or the filesystem refuses directory creation — not a per-job failure.","triggerScenarios":"Thrown at backend/src/main.rs:2332 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the worker's cache base dir (e.g. /tmp/windmill-cache or the configured BASE_CACHE_DIR env) is writable by the worker user","Check disk space and inode availability on that filesystem","In containers, ensure the cache path is a writable volume and the user has mkdir permissions"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}