Skip to content

Cyclic restarts with prune_bundler and Bundler.setup (require) and workers > 1 #2319

@AlexWayfer

Description

@AlexWayfer

Describe the bug

I'm trying to start a server via pumactl, but it fails in an infinity loop without backtraces:

> bundle exec pumactl start
[191794] * Pruning Bundler environment
[DEPRECATED] `Bundler.with_clean_env` has been deprecated in favor of `Bundler.with_unbundled_env`. If you instead want the environment before bundler was originally loaded, use `Bundler.with_original_env` (called at /home/alex/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/puma-4.3.5/lib/puma/launcher.rb:289)
[191794] * Pruning Bundler environment
[DEPRECATED] `Bundler.with_clean_env` has been deprecated in favor of `Bundler.with_unbundled_env`. If you instead want the environment before bundler was originally loaded, use `Bundler.with_original_env` (called at /home/alex/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/puma-4.3.5/lib/puma/launcher.rb:289)
[191794] * Pruning Bundler environment
[DEPRECATED] `Bundler.with_clean_env` has been deprecated in favor of `Bundler.with_unbundled_env`. If you instead want the environment before bundler was originally loaded, use `Bundler.with_original_env` (called at /home/alex/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/puma-4.3.5/lib/puma/launcher.rb:289)
...

Puma config:

# frozen_string_literal: true

## Require gems
require 'bundler/setup'
Bundler.require

prune_bundler

rackup 'config.ru'

workers 2

To Reproduce

Bundler.require (or .setup) + prune_bundler + workers > 1.

Run it with:

bundle exec pumactl start

Expected behavior

Server starts or some descriptive errors (once, not in a loop).

Desktop (please complete the following information):

  • OS: Arch Linux
  • Puma Version: 4.3.5 and 5.0.0.beta1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions