Re: [Pdns-users] mysql has gone away

2014-09-18 Thread a b
> (2) you should be extremely aware that talking to a database in a > blocking way from within a Recursor script is unsupported, as the > whole Recursor thread is paused while your script is querying the > database and making a decision Out  of  curiosity,  are  there any code examples of querying

Re: [Pdns-users] mysql has gone away

2014-09-18 Thread Aki Tuomi
On Thu, Sep 18, 2014 at 10:08:41AM +0200, Peter van Dijk wrote: > Hello, > > On 17 Sep 2014, at 22:47 , chayes wrote: > > > Oh wait! > > I misunderstood ... cur is the cursor. > > Do I need to close all three as below? > > I can’t answer that, but I have two other things to say: > > (1) libmys

Re: [Pdns-users] mysql has gone away

2014-09-18 Thread Peter van Dijk
Hello, On 17 Sep 2014, at 22:47 , chayes wrote: > Oh wait! > I misunderstood ... cur is the cursor. > Do I need to close all three as below? I can’t answer that, but I have two other things to say: (1) libmysqlclient supports automatic reconnection; you should check whether the Lua lib you ar

Re: [Pdns-users] mysql has gone away

2014-09-17 Thread chayes
Oh wait! I misunderstood ... cur is the cursor. Do I need to close all three as below? env = assert (luasql.mysql()) con = assert (env:connect ("dbname", "dbuser", "dbpassword", "127.0.0.1", 3306)) cur = assert (con:execute ("SELECT count(*) from whiteList where wldomain = '"..strDomain3.."'")) ro

Re: [Pdns-users] mysql has gone away

2014-09-17 Thread chayes
Thanks! added to my script (cur is the DB handle): cur:close() That appears to have worked! -- View this message in context: http://powerdns.13854.n7.nabble.com/mysql-has-gone-away-tp10974p10978.html Sent from the PowerDNS mailing list archive at Nabble.com. __

Re: [Pdns-users] mysql has gone away

2014-09-17 Thread Aki Tuomi
On Tue, Sep 16, 2014 at 11:48:03PM -0700, chayes wrote: > Positive. > This is a new server with no users yet so I am still testing. > Logs show no activity in between tests. > Nothing else running on the server. > Two servers both with the identical problem. > Nothing wrong with mysql. > Many other

Re: [Pdns-users] mysql has gone away

2014-09-16 Thread chayes
Positive. This is a new server with no users yet so I am still testing. Logs show no activity in between tests. Nothing else running on the server. Two servers both with the identical problem. Nothing wrong with mysql. Many others have had this problem based on my search but they don't specify whic

Re: [Pdns-users] mysql has gone away

2014-09-16 Thread Aki Tuomi
On Tue, Sep 16, 2014 at 01:38:01PM -0700, chayes wrote: > I am running pdns-recursor version 3.6 > In low-usage times (approx 1.5 hours of no activity) I start seeing the > "mysql has gone away" errors and pdns becomes sluggish and unresponsive. > I searched the archives and see recommendations to

[Pdns-users] mysql has gone away

2014-09-16 Thread chayes
I am running pdns-recursor version 3.6 In low-usage times (approx 1.5 hours of no activity) I start seeing the "mysql has gone away" errors and pdns becomes sluggish and unresponsive. I searched the archives and see recommendations to increase mysql wait times, but there is never an indication of w