Skip to content

Conversation

@mroderick
Copy link
Collaborator

Summary

Removes the preload_app! directive and on_worker_boot block from config/puma.rb. These cluster-mode features are not used since the application runs in single-process mode across all environments.

This change:

  • Eliminates the warning introduced in Puma 7.x about unused callbacks
  • Prepares for Puma 8.0 where on_worker_boot will be removed entirely
  • Has no behavioral impact - this code was never executing

Verification

Confirmed cluster mode is not in use:

  1. ✅ No workers setting in config/puma.rb (required for cluster mode)
  2. ✅ No WEB_CONCURRENCY environment variable in codebase
  3. ✅ Procfile uses standard single-process command
  4. ✅ No environment-specific Puma configuration overrides
  5. ✅ No worker config in environment files
  6. ✅ Puma 7.2.0 warning confirms the block "will not execute"

Related

Test Plan

  • Run test suite to verify no test failures
  • Start development server and confirm no Puma warnings appear
  • Verify application starts normally in Docker

This removes the preload_app! directive and on_worker_boot block from
config/puma.rb. These cluster-mode features are not used since the
application runs in single-process mode (no workers configured).

VERIFICATION THAT CLUSTER MODE IS NOT USED:

1. No 'workers' setting in config/puma.rb - cluster mode requires
   explicitly setting 'workers N' where N > 0. Without this, Puma
   runs in single-process mode by default.

2. No WEB_CONCURRENCY environment variable - searched entire codebase,
   no references found. This is Heroku's standard variable for
   controlling worker count.

3. Procfile uses standard single-process command:
   'bundle exec puma -C config/puma.rb' with no worker-related flags.

4. No environment-specific Puma configs - only config/puma.rb exists,
   no production/staging overrides.

5. Environment configs (development/production/test.rb) have no Puma
   worker configuration.

6. The Puma 7.2.0 warning itself confirms the on_worker_boot block
   "will not execute in the current Puma configuration."

IMPACT:

- No behavior change - this code was never executing
- Removes warning introduced in Puma 7.x about unused callbacks
- Prepares for Puma 8.0 where on_worker_boot will be removed entirely
- If cluster mode is needed in future, these are standard patterns
  that can be easily restored

Related to codebar#2447
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.

1 participant