<div dir="ltr"><div><div><div><div>Hello all,<br><br></div>we have a problem with a 1.4-version of Freeswitch that FS goes to 100% cpu. The problem has been traced to a dns-cache-problem. The dns-cache contains srv-records, which should have 2 a-records, but they have 100&#39;s of a-records, which are mostly the same (some with a different priority). This causes FS do to a lot of compares (to sort the records) and it goes to 100% cpu in the end. <br>The priority almost never is the original priority, so I was thinking that the cache is maybe growing because of graylisting of entries, causing the priority to increase and the ttl to be reset.<br><br></div>The code is however very difficult to follow as it is all event-based and part of big C-structs in sofia-sip. A bug in the gdb-debugger causing static variables to be almost unreadable makes life not much easier. The graylisting policy, as well as the dns cache policy is not really documented as far as I can find, so any info about this would be great.<br><br></div>Anyway, my current thought is that the dns-cache is maybe growing, becuase the graylisting-code sets the priority to a higher value and resets the ttl to a certain value (no idea which one, but the default is 10 minutes and the maximum a day). The srv-record-compare-function however checks also using priority and weight and returns a negative response if they are different. I would think that fs maybe then readds the original srv-records (with priority 0) when it requeries the dns. Those entries will also increase in priority and ttl when they are added, causing the cache to keep growing ...<br></div>Nscd is also being used for dns-caching, which doesn&#39;t help, but I&#39;m not sure if that is the problem as sofia_dig seems to return valid values (except maybe ttl).<br><div><br><br> I would think that ttl is never touched and that the cached is cleared when the ttl expires, but I have no idea when the dns-cache is cleared in FS...<br><br></div><div>I know this is maybe a lot of text, but any info on this topic (sofia dns cache) is welcome.<br><br></div><div>Thanks,<br><br></div><div>Michel<br></div><div><br><div><div><br><br></div></div></div></div>