You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note the Windows path that does work (scripts\run-membrane.cmd → start_router.cmd) is not the one users are pointed at. Even one of our own examples, distribution/examples/openapi/jwt-auth/membrane.cmd:90, passes %JAVA_OPTS% — so the example is more correct than the shipped launcher.
Windows users also silently lose the two XML entity-limit properties that start_router.cmd sets, since those ride along in JAVA_OPTS.
Impact
-Xmx/-Xms cannot be set on Windows at all.
-Dlog4j.configurationFile=... does not work, contradicting the documented usage in the membrane.sh header and distribution/examples/logging/json/README.md.
-Djdk.xml.*EntitySizeLimit from start_router.cmd is not applied.
Reproduce
setJAVA_OPTS=-Xmx123m
membrane.cmd
Then check the JVM: the flag is absent (jcmd <pid> VM.flags).
Suggested fix
Make membrane.cmd a thin shim that delegates to scripts\run-membrane.cmd, mirroring what membrane.sh does, rather than duplicating a divergent Java invocation. That removes the duplication as well as the bug.
Found while investigating #3119, where the reporter's JVM-option settings appeared to be ignored.
Problem
distribution/router/membrane.cmd— the Windows entry point shipped at the root of the distribution zip — invokes Java without%JAVA_OPTS%:So on Windows there is no supported way to set heap, system properties, or GC flags.
export JAVA_OPTS=...silently has no effect.Why it differs from Linux/macOS
The
.shlauncher is a 20-line shim that delegates, and the delegate honours the variable:membrane.cmdis instead self-contained (94 lines) and never delegates, so it misses theJAVA_OPTShandling thatscripts/start_router.cmdalready has:Note the Windows path that does work (
scripts\run-membrane.cmd→start_router.cmd) is not the one users are pointed at. Even one of our own examples,distribution/examples/openapi/jwt-auth/membrane.cmd:90, passes%JAVA_OPTS%— so the example is more correct than the shipped launcher.Windows users also silently lose the two XML entity-limit properties that
start_router.cmdsets, since those ride along inJAVA_OPTS.Impact
-Xmx/-Xmscannot be set on Windows at all.-Dlog4j.configurationFile=...does not work, contradicting the documented usage in themembrane.shheader anddistribution/examples/logging/json/README.md.-DmaxYamlCodePoints=...(see Lift the 3 MiB size limit on OpenAPI documents #3122) cannot be used to bound OpenAPI document size on Windows.-Djdk.xml.*EntitySizeLimitfromstart_router.cmdis not applied.Reproduce
Then check the JVM: the flag is absent (
jcmd <pid> VM.flags).Suggested fix
Make
membrane.cmda thin shim that delegates toscripts\run-membrane.cmd, mirroring whatmembrane.shdoes, rather than duplicating a divergent Java invocation. That removes the duplication as well as the bug.Found while investigating #3119, where the reporter's JVM-option settings appeared to be ignored.