Skip to content

Conversation

@toontoet
Copy link
Contributor

When running CasparCG in headless mode in Docker only limited number of html layers work (2 with gpu enabled, 4 without gpu).

This fix increases the number of CEF processes and disables shared memory, which migh be to limited in Docker environments.

// FIX 1: Increase renderer process limit to support more concurrent HTML layers
// Default CEF limit is ~3-6 processes, which limits HTML layer count
command_line->AppendSwitchWithValue("renderer-process-limit", "20");

// FIX 2: Prevent shared memory exhaustion on Linux (especially in Docker)
// /dev/shm is limited to 64MB by default in most Docker containers
command_line->AppendSwitch("disable-dev-shm-usage");

@Julusian
Copy link
Member

From reading puppeteer/puppeteer#1834 I am not sure that the dev-shm change is a good idea.

Instead maybe it would be enough to document that when running the docker image --shm-size=256m argument should be used. Perhaps some testing is needed to choose a suitable value for that, or leave that up to the user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants