Got it, thanks!

On Sunday, October 10, 2021 at 7:55:17 PM UTC-7 Jeremy Evans wrote:

> On Sun, Oct 10, 2021 at 6:17 PM [email protected] <[email protected]> 
> wrote:
>
>> I like the default pool_timeout of 5 seconds, but sometimes I'd like to 
>> extend it like for example when I'm uploading photos in a transaction and I 
>> want everything to fail if one of the items doesn't copy to a AWS bucket. 
>>
>> Probably not a good practice to open a transaction and put web requests 
>> running inside, but if I want to increase the pool_timeout for one block, 
>> how can I do that?
>>
>> ie.
>>
>> db.transaction do 
>>
>> end
>>
>> something like...
>>
>> db.transaction(pool_timeout: 20) do 
>>
>> end
>>
>> Something like that exists?
>>
>
> No.  The pool timeout is fixed.  I'm not sure it would help your case 
> anyway, since the pool timeout is the amount of time before a request to 
> checkout a connection from the pool raises an exception.  It doesn't affect 
> how long a connection is allowed to be checked out.  Trying to increase the 
> pool timeout is unlikely to be a good solution.  Increasing the number of 
> connections the pool is probably a better approach to solving the problem.
>
> 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/74ec3610-208e-401e-8a54-5e2ef1c0c849n%40googlegroups.com.

Reply via email to