I managed to write this script which tests list of domains. His task is to get answer from every domain if it has any NS record. If it has, then this script tests every obtained NS records if it has IPv6 address (AAAA record).Problem is that script more and more triggers Timeout exception although the domain has NS records. In the last stages when is almost on the end of the list of domains is nearly every domain evaluated as without NS records.I think problem is with threads or in main_thread part of the script.I used threading because I need to process 280k domains and I need to process it fast. So, I created for every domain thread (main_thread) and within the main thread Subthreads (NS_getAAAA_thread) for every obtained NS record.

This is just the part of the whole scirpt where Im testing simultaneously glue, AAAA, MX and NS record for every domain in list. Glue and AAAA record for www.[domain] are evaluated correctly, problem is just occuring while getting MX and NS records. Some of them are properly evaluated but while I am closer to the end of the domain list the worse answers from resolver are.