Sounds great, testOnBorrow would also fix the issue (just in a different way).  

For now I realized I could also emulate it by making a "dummy" nifi processor 
that runs a SELECT 0 query once every couple hours during the night to keep it 
alive manually.  I know you guys are working hard on releasing Nifi 1.1.0 and 
0.7.1 (which I am excited to see) and I didn't want to distract too much from 
it, but it sounds like you've already got covered (which is why I asked before 
submitting a JIRA).

Awesome work as usual, cheers!


Jason Hamilton 
Senior Software Developer 
Home Care Pulse, LLC 
www.homecarepulse.com 
208.228.0895 (Direct) 
877.307.8573 (Office) 



Satisfaction Management | Benchmarking | BestofHomeCare.com | Blog 


-----Original Message-----
From: Matt Burgess [mailto:[email protected]] 
Sent: Thursday, October 20, 2016 2:21 PM
To: [email protected]
Subject: Re: Question on DBCP and testWhileIdle

Jason,

These could be added as properties to the DBCPConnectionPool controller 
service. I have a branch somewhere (but hadn't yet written a Jira) to add "Min 
Idle Connections" and "Max Idle Connections" (from that same link you gave), 
and a "Validation Query" has been added (along with testOnBorrow) to the master 
branch (NiFi 1.1.0) [1].

Would Validation Query (with setting testOnBorrow to true) suffice for your 
needs? If not, any of these properties could be added, with the caveat that the 
documentation should indicate that there may be performance impact.

Regards,
Matt

[1] https://issues.apache.org/jira/browse/NIFI-2381


On Thu, Oct 20, 2016 at 12:58 PM, Jason Hamilton <[email protected]>
wrote:

> Hello all,
>
>
>
> Just a simple question: is there a way to configure a DBCP service in 
> Nifi to use testWhileIdle and timeBetweenEvictionRunsMillis (per 
> http://commons.apache.org/proper/commons-dbcp/configuration.html ).  I 
> would like to use the built-in DBCP service for my custom processors, 
> but every morning the first query fails with the message:
>
> ---
>
> *The last packet successfully received from the server was 60,904,468 
> milliseconds ago.  The last packet sent successfully to the server was
> 60,904,680 milliseconds ago. is longer than the server configured 
> value of 'wait_timeout'. You should consider either expiring and/or 
> testing connection validity before use in your application…*
>
> ---
>
>
>
> It’s a common issue, and the settings should fix it, I’m just not sure 
> if I can “put” them somewhere to use them with the built-in DBCP 
> service tools in Nifi (1.0.0, CentOS 7).  Thanks in advance!
>
>
>
> [image: photo]
> <http://homecarepulse.com/?utm_source=logoLink&utm_medium=Jason&utm_ca
> mpaign=EmailSignature>
>
> *Jason Hamilton*
> Senior Software Developer
> Home Care Pulse, LLC
>
> www.homecarepulse.com
> <http://homecarepulse.com?utm_source=websiteLink&utm_medium=Jason&utm_
> campaign=EmailSignature>
> 208.228.0895 (Direct) <2082280895>
> 877.307.8573 (Office) <8773078573>
>
> [image: Linnked In] <http://www.linkedin.com/company/home-care-pulse>[image:
> Facebook] <http://facebook.com/homecarepulse>[image: Twitter]
> <http://twitter.com/homecarepulse>[image: Google+] 
> <http://plus.google.com/+Homecarepulse/posts>
>
> Satisfaction Management
> <http://www.homecarepulse.com/program-details?utm_source=bottomLinks&u
> tm_medium=Jason&utm_campaign=EmailSignature>
> | Benchmarking
> <http://benchmarking.homecarepulse.com?utm_source=bottomLinks&utm_medi
> um=Jason&utm_campaign=EmailSignature>
> | BestofHomeCare.com
> <http://www.bestofhomecare.com?utm_source=bottomLinks&utm_medium=Jason
> &utm_campaign=EmailSignature>
> | Blog
> <http://www.homecarepulse.com/blog?utm_source=bottomLinks&utm_medium=J
> ason&utm_campaign=EmailSignature>
>
>
>
>
>

Reply via email to