[Pdns-dev] virtual memory issue and gmysql

Patrick Domack patrickdk at patrickdk.com
Wed Oct 3 12:06:22 CEST 2007


Well, I was working on my mysql server, and noticed, as I suspected,  
even with my reconnect code, the underlaying problem still exists.

To replicate this, it should be very easy, setup pdns with gmysql to  
connect and use mysql like normal, but never have mysql running. It  
will just alloc memory after memory for each attempt. Since my  
reconnect fails to reconnect is also has this problem, but when  
mysql-lib can reconnect it doesn't throw the error back pdns so it  
doesn't have this problem normally, till the reconnect fails.



Quoting Stephen Manchester <smanches at craftyspace.com>:

> Oh, and I'm not saying this is a bug in pdns exactly.  Believe me, I've
> found more than enough "quirks" in the MySql client libraries to drive
> any person insane.  :p
>
> Just haven't had a chance to figure out where the actual problem is yet.
>
> On Oct 2, 2007, at 10:06 PM, Stephen Manchester wrote:
>
>> This would correlate with what I've seen as well.  We are not that   
>> busy at all, and even though I have our MySQL connection timeout   
>> set for 8 hours, I'm sure a single connection could easily not get   
>> used for that long of a time.  Not sure if pdns cycles the   
>> connections regularly, or just uses the first available one, but if  
>>  the later, then that could explain it easily.  Still haven't  
>> looked  at the code.
>>
>> Just thought I'd drop the note.
>>
>>
>> On Oct 2, 2007, at 9:47 PM, Patrick Domack wrote:
>>
>>> I did more testing, and actually watched the log file this time   
>>> and the log shows this for every extra 10megs of memory allocated:
>>>
>>> Oct  3 00:31:08 blade2 pdns[13541]: Backend error: Failed to   
>>> execute mysql_query, perhaps connection died? Err=1: MySQL server   
>>> has gone away
>>> Oct  3 00:31:08 blade2 pdns[13541]: gmysql Connection succesful
>>> Oct  3 00:31:08 blade2 pdns[13541]: gmysql Connection succesful
>>> Oct  3 00:31:13 blade2 pdns[13541]: Backend error: Failed to   
>>> execute mysql_query, perhaps connection died? Err=1: MySQL server   
>>> has gone away
>>> Oct  3 00:31:18 blade2 pdns[13541]: gmysql Connection succesful
>>> Oct  3 00:31:18 blade2 pdns[13541]: gmysql Connection succesful
>>> Oct  3 00:33:18 blade2 pdns[13541]: Backend error: Failed to   
>>> execute mysql_query, perhaps connection died? Err=1: MySQL server   
>>> has gone away
>>> Oct  3 00:33:18 blade2 pdns[13541]: gmysql Connection succesful
>>> Oct  3 00:33:18 blade2 pdns[13541]: gmysql Connection succesful
>>>
>>> This is with a request rate of one every 29 seconds, and a mysql   
>>> timeout of 60 seconds.
>>>
>>> This isn't an issue with busy servers, cause it never has a 60sec   
>>> idle time between requests. I don't have this issue with 7 of my   
>>> production server, just the 3 I setup and are in development   
>>> testing, cause they aren't high load yet.
>>> But this means a high load server, that has a temp routing issue   
>>> or other problem, will also start to notice this issue.
>>>
>>> Quoting bert hubert <bert.hubert at netherlabs.nl>:
>>>
>>>> On Mon, Oct 01, 2007 at 03:30:24AM -0400, Patrick Domack wrote:
>>>>> I have seen reports of this in the users maillist.
>>>>
>>>> Indeed - but quite a number of very large installations do not see a
>>>> problem. So it has to be something site specific.
>>>>
>>>>> the rpm package for pdns-static version 2.9.21
>>>>> on redhat el5 x86_64
>>>>
>>>> Can you count if the chunks of 10240KB it loses correspond to   
>>>> certain errors
>>>> in the log perhaps?
>>>>
>>>> And does your patch fully resolve the issue?
>>>>
>>>> Thanks.
>>>>
>>>>
>>>> --
>>>> http://www.PowerDNS.com      Open source, database driven DNS Software
>>>> http://netherlabs.nl              Open and Closed source services
>>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Pdns-dev mailing list
>>> Pdns-dev at mailman.powerdns.com
>>> http://mailman.powerdns.com/mailman/listinfo/pdns-dev
>>
>> _______________________________________________
>> Pdns-dev mailing list
>> Pdns-dev at mailman.powerdns.com
>> http://mailman.powerdns.com/mailman/listinfo/pdns-dev
>
> _______________________________________________
> Pdns-dev mailing list
> Pdns-dev at mailman.powerdns.com
> http://mailman.powerdns.com/mailman/listinfo/pdns-dev





More information about the Pdns-dev mailing list