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

Fork safety warning when booting Solid Queue #506

Open
alxckn opened this issue Jan 31, 2025 · 0 comments · May be fixed by #511
Open

Fork safety warning when booting Solid Queue #506

alxckn opened this issue Jan 31, 2025 · 0 comments · May be fixed by #511

Comments

@alxckn
Copy link

alxckn commented Jan 31, 2025

In the context of a brand new app with Solid Queue installed (SQlite), a warning is emitted when booting the supervisor using bin/jobs start:

.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/sqlite3-2.5.0-x86_64-linux-gnu/lib/sqlite3/fork_safety.rb:43: warning: Writable sqlite database connection(s) were inherited from a forked process. This is unsafe and the connectio
ns are being closed to prevent possible data corruption. Please close writable sqlite database connections before forking.

There seems to be at least three places where a connection is established and not closed before the supervisor forks workers, dispatchers or schedulers:

I'd expect this will be hard to abstain from issuing connections in the supervisor process, so perhaps connections should be explicitely closed by Solid Queue before forking processes.

@alxckn alxckn linked a pull request Feb 5, 2025 that will close this issue
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 a pull request may close this issue.

1 participant