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

Leaking zombie processes #364

Closed
Nakilon opened this issue Jun 22, 2023 · 1 comment
Closed

Leaking zombie processes #364

Nakilon opened this issue Jun 22, 2023 · 1 comment

Comments

@Nakilon
Copy link
Contributor

Nakilon commented Jun 22, 2023

FROM ruby:2.7-alpine
RUN gem update bundler
RUN apk add build-base chromium
require "ferrum"

loop do
  puts "loop"
  browser = Ferrum::Browser.new headless: true, browser_options: {"no-sandbox" => nil}
  browser.go_to "http://t.me/tomsk_region70"
  sleep 10
ensure
  browser&.quit
end
$ docker run --rm -d -v $(pwd):/app -w /app -p 8002:8000 --name temp chromium sh -c "gem install ferrum && ruby app.rb"
$ docker exec temp ps aux | grep chrome
root        41  0.1  0.0      0     0 ?        Z    05:45   0:00 [chrome] <defunct>
root        42  0.1  0.0      0     0 ?        Z    05:45   0:00 [chrome] <defunct>
root        62  3.6  0.0      0     0 ?        Z    05:45   0:01 [chrome] <defunct>
root        64  0.1  0.0      0     0 ?        Z    05:45   0:00 [chrome] <defunct>
root        71 15.8  0.0      0     0 ?        Z    05:45   0:06 [chrome] <defunct>
root        98  0.1  0.0      0     0 ?        Z    05:45   0:00 [chrome] <defunct>
root        99  0.2  0.0      0     0 ?        Z    05:45   0:00 [chrome] <defunct>
root       115  5.5  0.0      0     0 ?        Z    05:45   0:01 [chrome] <defunct>
root       118  0.1  0.0      0     0 ?        Z    05:45   0:00 [chrome] <defunct>
root       124 24.7  0.0      0     0 ?        Z    05:45   0:06 [chrome] <defunct>
root       155  0.3  0.0      0     0 ?        Z    05:45   0:00 [chrome] <defunct>
root       156  0.3  0.0      0     0 ?        Z    05:45   0:00 [chrome] <defunct>
root       173  9.6  0.0      0     0 ?        Z    05:45   0:01 [chrome] <defunct>
root       175  0.3  0.0      0     0 ?        Z    05:45   0:00 [chrome] <defunct>
root       181 44.0  0.0      0     0 ?        Z    05:45   0:06 [chrome] <defunct>
@Nakilon
Copy link
Contributor Author

Nakilon commented Jun 22, 2023

Seems to be resolved by https://docs.docker.com/compose/compose-file/compose-file-v3/#init
I'll close when I'm sure.

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

1 participant