Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: ffmpeg was killed with signal SIGSEGV #1299

Open
hungnkb opened this issue Sep 13, 2024 · 1 comment
Open

Error: ffmpeg was killed with signal SIGSEGV #1299

hungnkb opened this issue Sep 13, 2024 · 1 comment

Comments

@hungnkb
Copy link

hungnkb commented Sep 13, 2024

Version information

  • fluent-ffmpeg version: 2.1.3
  • ffmpeg version: ffmpeg-6.1.1-r8
  • OS: Docker image - node:22-alpine

Code to reproduce

ffmpeg()
          .setFfprobePath(ffprobe.path)
          .input(filePath)
          .screenshots({ folder: folderPath, filename: fileName + '.png', count: 1 })

Hi, im when i try in local machine it worked. But on development implement with Docker, i got error:

error Error: ffmpeg was killed with signal SIGSEGV
    at ChildProcess.<anonymous> (/app/node_modules/fluent-ffmpeg/lib/processor.js:178:22)
    at ChildProcess.emit (node:events:520:28)
    at ChildProcess._handle.onexit (node:internal/child_process:294:12)

Please help me to show some solution there. Thanks

@gspinoza
Copy link

I was dealing with a similar issue and everything points to resource limits issue.
Some ffmpeg processes can use too much memory when dealing with large files. When this happens the container can quickly run out of memory so the kernel sends a signal to terminate the process immediately.

To confirm this I inspected the container and could see that the OOMkilled "out of memory" value was set to true:

	"State": {
		"OOMKilled": true,
	},

I tried running the container with unlimited host resources or increasing the memory limit, but the process was still getting killed by OOMKilled.

What solved the issue was increasing the "Resource Allocation" of docker (not the container). I increased the cpu limit, memory limit, and swap by editing the settings.json

If using docker desktop GUI it can be done through the settings menu:
Settings > Resources > Advanced

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

No branches or pull requests

2 participants