> Are you using a connection string of "jdbc:sqlite::memory"?

In the link I sent you, I used "jdbc:sqlite:/$(pwd)/test.db. The error is 
related with some file lock, which probably means that access to the file 
db in sqlite is assumed not to be concurrent(?) and running tests in 
parallel can't possibly go?

> You could try limiting the ActiveRecord and Sequel connection pool sizes 
to 1

I'll try that, thanks for the suggestion.

> Unless it is critical, I would recommend not testing in parallel mode 
when using SQLite,...

That's definitely on the table. However, concurrent tests don't break with 
CRuby, hence why I thought something was wronng with the jruby build. Maybe 
the c-extension is somehow limitng the pool?

Thanks for the help,
Tiago
A domingo, 30 de agosto de 2020 à(s) 01:52:08 UTC+1, Jeremy Evans escreveu:

> 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/7167c9ea-d29e-4b5e-98bb-bc12b1e3227en%40googlegroups.com.

Reply via email to