On Saturday, August 29, 2020 at 4:20:43 PM UTC-7, Tiago Cardoso wrote: > > > Are you using a memory database or a file-backed database? > > memory. > > > If a memory database, the error appears to be it creates a new > connection... > > Ok, you're saying that a new connection is created for every thread, and > that means, an empty memory database? Even when I ran the migrations in the > main thread's connection? That seems a bit odd. >
Correct. There is no way to share connections to an SQLite memory database as far as I know. > What'd be the best way to workaround that? I've tried changing to a > file-backed database, but now I'm seeing lock contention issues on the file > (see: https://gitlab.com/honeyryderchuck/rodauth-oauth/-/jobs/710170917). > Are you using a connection string of "jdbc:sqlite::memory"? If so, you shouldn't get that as Sequel should limit the pool size to 1 in that case. However, again, that depends on using Sequel directly. I have no idea what happens when using sequel-activerecord_connection, and no desire to try to figure it out. You could try limiting the ActiveRecord and Sequel connection pool sizes to 1, but beyond that I have no suggestions. Unless it is critical, I would recommend not testing in parallel mode when using SQLite, as that seems the simplest way to avoid the issue. Thanks, Jeremy -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sequel-talk/96cf5257-f9f4-42c8-b400-2efc50ce6436o%40googlegroups.com.
