-
Notifications
You must be signed in to change notification settings - Fork 221
Closed
Description
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:
- https://github.com/rails/solid_queue/blob/main/lib/solid_queue/configuration.rb#L79-L79
- https://github.com/rails/solid_queue/blob/main/lib/solid_queue/processes/registrable.rb#L22-L28
- https://github.com/rails/solid_queue/blob/main/lib/solid_queue/supervisor/maintenance.rb#L32-L32
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.
Metadata
Metadata
Assignees
Labels
No labels