← Priority list
Unclaimed

Make the droplets web app cold start fast after identifying the production startup cost

Obtain the exact deployed JAR through an approved method, identify the production-specific startup cost, and reproduce it before a structural fix. Main profiles below one second even with exact saved history; production records put most variation after JVM startup. Evidence and tools are pushed on wip/lanePcold2-startup-profile. A read-only SSH exception for the JAR is pending because the supported file reader is text-only and capped at10MB.

Handoff document

Markdown

Handoff: Make the droplets web app cold start fast

Written 2026-10-21T19:21:49.333712+00:00

RE-VERIFY: This is a snapshot. Check current main and the branch head with git, the HTTPS route with ContainerNursery routes, and the current access decision before acting. The configured production filename identifies9b011872, but its byte digest has not been verified.

Design decisions in effect

Owner rules dated 2026-10-21:

  • "Never raise a ContainerNursery route keepWarmSeconds beyond 5 minutes to hide a cold start; fix startup/first-request instead."
  • "No JVM tuning flags on JVMs we launch (no CDS/AppCDS archives, no -XX flags, no heap changes). Look for structural/algorithmic cost in our own code and dependencies."
  • "No timeouts raised, no caching that hides wrong data."
  • "Read-only on production. No deploys, restarts, or route edits."
  • "If the dominant cost turns out to be in ContainerNursery or an upstream library, stop after the reproducer and report; do not patch around it in the WUI."
  • No merges, queue actions, or Maven publications. A change needs a reliable initially red test, a reversal control, and a PR opening with the user's stated provenance. Do not watch CI after opening that PR.
  • Use local targeted tests; use the machine-wide suite lock only if a shared contract changes. Do not change existing test budgets or iteration counts. No reflection or mocks.
  • SSH is permitted only if both supported APIs are down. Both respond. A specific read-only SSH exception for retrieving the JAR is pending; no exception has arrived.

Mission

The owner reported that https://droplets.wasmserver.com/ "is super unreliable, frequently rendering various errors/notices due to bugs in UrlResolver or UrlProtocol or something else" and asked for the underlying root cause to be fixed. The HTTPS route stops the WUI after 5 idle minutes, so many human visits start a JVM.

This lane must profile the exact configured JAR and main, explain the 4–10-second cold-visit spread, and write a reliable initially red test before a structural change in its owning layer. It has not established that production-specific mechanism or delivered a fix.

What was found and done

  1. Read the prior timing lane in full and used a fresh checkout. Main remains 9b0118727a17c4163beebcb6ff80d614826ebed2. The local build succeeds and produces40446520 bytes, SHA-256 ce3d4684f4d4befca62771853b8c46125e7324d4cef2de35e539e6f012eb4e59.
  2. Preserved lightweight5ms wall-stack sampler and a separate timestamp agent, each with plain controls. Main spends its early local time in first-use class loading, Jetty construction/start, and then rendering/date/string helpers. Resolver setup is on the background initializer after the listener opens. A ready backend is not required for the first page.
  3. Empty-history main plain first-page totals are 226/244 ms. A one-CPU diagnostic yields413/420 ms. The timestamp agent has substantial overhead and must not be used as an absolute production estimate. There are 15 diagnostic JVM runs total; no4–10-second production delay was reproduced.
  4. Retrieved the exact production history through the supported text API: /root/ContainerNursery/data/last-known.json,5168 bytes,3 regions, SHA-256 594d8f7966713e1183ffbf0bdb5261b71219af1b271b854d06221eaad6b75df7. Plain main with this exact input totals 285/275 ms to first page. Releasing only this local JAR's file pages before launch yields265/253 ms. A fincore control confirms zero resident pages after the same local advice call. Thus neither saved input nor local file-page state reproduces the production delay.
  5. Aligned six production visits. Five have WUI startup records. Estimated request-to-JVM-uptime-origin spans 76–563 ms; JVM-origin-to-listening spans 2668–6889 ms; listening-to-request-completion spans 533–2763 ms. Most of the spread is after the JVM uptime reference, not a several-second pre-JVM gap. Exact historical OS process-spawn timestamps are absent, and the 17:13 WUI sequence is unavailable. The records locate the large changing phases but do not identify their code-level cause.
  6. Current file lookup reaches the API size check and reports the production JAR's length40446520bytes, matching the local build. Earlier worker path misses are superseded by this current result. Equal length is not a digest match. HCF read-file uses text and has a 10 MB cap, so it cannot retrieve this JAR intact. CN has upload/list/delete handlers and no JAR-content GET handler. A .jar.sha256 sidecar is unavailable. Proc text reads return zero bytes because the daemon's bounded reader uses reported length; this is not evidence of empty process arguments. No SSH was used.
  7. Production has existing Serial GC/free-ratio/stack/direct-memory options and 128 MiB heap/metaspace caps. None was changed or supplied by the lane. Local runs use default JVM settings, so launch configuration is an additional comparison limit. No unmeasured flag effect is presented as a cause.
  8. The existing testColdSetupServesFirstFrame passes before and after a successful fetch/rebase. Latest XML says success=true,time 1576 ms. CLI 0.0.124 emits no test-attempt counter; output has no retry labels. Do not claim the requested XML first-attempt bar. No existing test changed, no new reproducer was written, and no structural fix or reversal control exists.
  9. No shared public contract changed, so no complete suite was run or queued. No PR was opened, no CI was watched, and no deploy, restart, route edit, publication, merge, or queue action occurred.

Relevant refs

Repository Branch Remote head PR Contents State
DigitalOceanDropletWui https://github.com/CodexCoder21Organization/DigitalOceanDropletWui/tree/wip/lanePcold2-startup-profile 5efb52dbaa5185152aa2de3c01cfa9df04de10e9 none Findings, profiling tools, measured controls, numeric production alignment, selected startup records builds; unchanged baseline test passes; no production-specific reproducer or fix

Primary findings: https://github.com/CodexCoder21Organization/DigitalOceanDropletWui/blob/wip/lanePcold2-startup-profile/investigations/lanePcold2/findings.md

Prior lane: https://github.com/CodexCoder21Organization/DigitalOceanDropletWui/blob/wip/lanePcold-request-timing/investigations/lanePcold/findings.md

Configured live image: /root/ContainerNursery/apps/digitalocean-droplet-wui-v0.0.16-main-9b011872.jar at https://droplets.wasmserver.com/. Latest route recheck retained this filename and 300-second keep-warm value. This lane deployed or published nothing; its branch contains diagnostic material only.

Next steps

  1. Re-verify current state first, including the user's pending read-only SSH decision. Both APIs respond, so the existing rule still disallows SSH unless a specific exception arrives. Do not infer approval from elapsed time.
  2. Obtain the exact JAR through an approved byte-preserving method, verify its digest against the rebuilt JAR, and repeat the preserved lightweight profile with the same history. The history is already readable through HCF; the remaining file-access need is the JAR only.
  3. Establish a production-specific condition that explains the extra JVM/HTTP seconds. Current evidence does not support a particular WUI algorithm, a multi-second CN pre-JVM delay, or a saved-history/file-page cause. Do not replace missing evidence with a local elapsed-time threshold.
  4. Write the reliable public-API reproducer in the owning layer. If the cause belongs upstream, stop after the reproducer and report, as this lane requires. If it belongs in WUI, apply the structural change, show the test's red/green reversal, verify the requested attempt counts, and open the PR with the required provenance and footer. No production change is authorized.

Operational knowledge and omissions

  • The repository branch contains all analysis and diagnostic source needed to resume. Large raw logs, built JARs, and private operational history are intentionally excluded. Numeric timings, the history digest/size, and selected startup events are preserved.
  • For HCF use the existing alternate client_cert.pem, fabric_key.pkcs8, server_cert.pem names under /home/leslie/.config/hardware-control-fabric/. Do not publish those files.
  • New source checkouts must be fresh and under the lane's own workspace. Other lanes' directories must not be edited or used for builds.
  • Read the Testing Architecture sections Test-Driven Development and Never Calibrate a Reproducer to a Machine before tests: https://github.com/CodexCoder21Organization/DocumentationRepository/blob/main/architecture/TESTING.md
  • The old PlanRepository handoff README describes a git merge path; the current create-handoff skill uses the central service. This handoff uses the service and no merge/queue operation.

Model usage

Recorded agent work, including concurrent agents

No model usage has been recorded for this handoff yet.

Record work with handoff-cli usage report hf-2026-10-21-make-the-droplets-web-app-cold-start-fast-after-identifying-the-production-startup-cost.

Latest status report

2 reports
Running lanePcold4 79f96be0 1 hour ago

Lane P-cold4 measurement report Written: 2026-10-21T20:04:38.469876+00:00 This is a read-only investigation snapshot. The broader cold-start issue is not declared complete. The owner asked for the production host condition adding cold-start seconds. This lane measured guest CPU scheduling contention: Java main accumulated 0.421 and 0.907 seconds queued in two instrumented natural cold visits. Their complete client durations were 2.104 and 2.808 seconds. The larger historical 4–10-second span remains unproved; no repair is proposed from these counters alone. One instrumented visit has complete before/during counters. The second begins 0.18 seconds after process creation and supplies a comparison. A longer preliminary 15.977-second visit lacks its during-startup counters because the host command service caps returned text at 10,000 characters. Three first-attempt HTTP 200 visits occurred, without client repeats. No automated tests were written or run for this measurement task. Memory available was about 5.6–6.2 GiB during the instrumented captures. Major faults were one in the first visit, and three rising to four in the second. File-page residency and physical-read counters do not support multi-second archive or swap waits in those captures. The busiest retained CPU owners include ContainerNursery and several other JVM services. Stable thread counts and these short samples do not establish one expanding memory owner or a particular source-level CPU defect.

Relevant refs | Repository | Branch | Remote head at report time | PR | State | | --- | --- | --- | --- | --- | | CodexCoder21Organization/DigitalOceanDropletWui | https://github.com/CodexCoder21Organization/DigitalOceanDropletWui/tree/wip/lanePcold4-host-counters | 6286482c7670e2918cd4b82c3b15d9e8d1625857 | no PR | collectors and numeric evidence committed; clean working tree; no builds or tests | Findings: https://github.com/CodexCoder21Organization/DigitalOceanDropletWui/blob/wip/lanePcold4-host-counters/investigations/lanePcold4/findings.md Comparison: https://github.com/CodexCoder21Organization/DigitalOceanDropletWui/blob/wip/lanePcold4-host-counters/investigations/lanePcold4/comparison.json This lane made no deployment, publication, production restart, configuration edit, or implementation edit. No merge or queue action occurred.

Next evidence for the broader effort Capture an actual 4–10-second visit with the same counters retained, and see whether main-thread queue time accounts for that span. If so, profile the competing JVM work; if not, follow the unaccounted phase. Other visitors at 19:53:09 reset the idle timer in this lane, so coordinate the observation window. Never interpret historical swap allocation as proof of current memory waits. HCF certificates use the existing client_cert.pem, fabric_key.pkcs8, and server_cert.pem basenames here. Proc text requires read-only diagnostic commands because the current file reader uses reported file length. Host command execution is bounded at 60 seconds and retained output at 10,000 characters; the collector compresses and thins samples when needed. Every diagnostic process ended; no background sampler remains.

Earlier reports

Running lanePcold3 79f96be0 1 hour ago

Add dependency

Complete this handoff

Moves it out of every priority list and into ArchiveArea.