Skip to content

Conversation

@faraquet
Copy link

@faraquet faraquet commented Oct 23, 2025

Introduces an optional lightweight HTTP server for health checks, integrated with Solid Queue lifecycle.

  • Endpoints:
    • / and /health: returns 200 OK with body OK
    • Any other path: returns 404 Not Found
  • Configure via config/queue.yml under health_servers:. Defaults fall back to SOLID_QUEUE_HTTP_HOST (host) and SOLID_QUEUE_HTTP_PORT (port) if not provided.

Enable and configure via process configuration:

production:
  health_servers:
    - host: 0.0.0.0
      port: 9393

Note:

  • This runs under the supervisor just like workers/dispatchers.
  • When the Puma plugin is active (plugin :solid_queue in puma.rb), configured health_servers are skipped to avoid running multiple HTTP servers in the same process tree. A warning is logged. If you need the health server, run Solid Queue outside Puma (for example, via bin/jobs) or disable the plugin on that instance.

@faraquet
Copy link
Author

faraquet commented Oct 23, 2025

@rosa could you please have a look? This is a simple and safe change, but I believe it will be useful for many people, including myself.
I'm sure the failing tests are unrelated, as I've seen the same issue in other branches.

Happy to discuss if needed

@Th3-M4jor
Copy link
Contributor

Feel free to disagree with me on this, but what about adding some kind of check to ensure that this can't be run while also using the Puma plugin?

@faraquet
Copy link
Author

Thanks for the hint, @Th3-M4jor 👍

I agree with you and will add an extra check.

@faraquet faraquet force-pushed the aaa/health_server branch 2 times, most recently from d371408 to 177afd4 Compare October 24, 2025 00:13
@faraquet
Copy link
Author

Added ✅

@faraquet
Copy link
Author

I've revised the idea in favour of launching via supervisor and setting it up via a config file, just like workers

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