Repository navigation
fix: start without waiting for npm's audit request - #113
Merged
dgibbs64 merged 2 commits intoNov 1, 2026
Merged
Conversation
This was referenced Nov 1, 2026
[Bug]: gamedig npm calls hang when the npm registry does not answer
GameServerManagers/LinuxGSM#5127
Closed
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
entrypoint-user.shrunsnpm installin/app/lgsmon every start. Even whennode_modulesis already complete, npm sends its audit request to the registry, and when the registry accepts the connection but does not answer, the start waits on it. On a Killing Floor 2 server built on this image, a start took about twenty minutes the night the registry did not answer, and twenty-five seconds after the deployment turned audit off (it also bounded npm's other timeouts; the measurement below shows audit is the one that matters).This adds
--no-auditto thatnpm install. The entrypoint never reads the audit result, so nothing it does changes; installs that do need the registry (a first start with nonode_modules) behave as before.Every
gameservermanagers/gameserverimage inherits this entrypoint (FROM ghcr.io/gameservermanagers/linuxgsm), so the one flag covers all of them.Testing
In
gameservermanagers/gameserver:hz(node v24.22.1, npm 12.2.1): installed LinuxGSM'spackage.jsononce with the registry reachable, then pointedregistry.npmjs.orgat a local listener that accepts every connection and never answers, and timednpm installin/app/lgsmas thelinuxgsmuser, 90-second limit:--no-audit--no-audit --no-fund --no-update-notifier--prefer-offline--no-auditalone makes the difference, so it is the only change.shellcheck -S warning entrypoint-user.shis clean.This change was prepared with AI assistance and reviewed before submitting.