> Yes, a lot of "personal" routers have low limits on the number of > connections. Space in the nat table is often an issue. Well, It does work with dns queries about different domains
> d. You can > intercept DNS resolution errors by using an THTTPSend.Sock.OnStatus > event handler and analyzing Value when Reason=HR_ResolvingEnd. > Value=':0' when DNS fails. Note that DNS also fails when the url does > not have a valid domain. You can than then retry HTTPMethod from your > program as many times as you want and find reasonable. I guess I will do that... > No local > solution will be able to avoid it. Only retry when fail is a robust > solution. But it will be faster than retrying Benito On 12/21/2012 08:23 AM, Ludo Brands wrote: > On 20/12/2012 21:32, Benito van der Zander wrote: >> However, I figured out, why it does not work. >> It has nothing to do with http or multithreading, but with the DNS requests. >> >> Synapse sends the query correctly to the router (192.168.1.100), but >> there never comes a response! >> <snip> >> >> However, it does work fine, if I run it in single threaded mode >> manually, waiting for a connection to close, before opening the next one. >> So it seems the router "forgets" the dns query, if there is another >> query for the same host in the same second. >> >> >> But there surely are many router like that, and synapse should work . > Yes, a lot of "personal" routers have low limits on the number of > connections. Space in the nat table is often an issue. >> So how can we make it more robust? >> >> Try the DNS request again, if the first fails? > DNS is using UDP, so no guarantee that the packet is delivered. You can > intercept DNS resolution errors by using an THTTPSend.Sock.OnStatus > event handler and analyzing Value when Reason=HR_ResolvingEnd. > Value=':0' when DNS fails. Note that DNS also fails when the url does > not have a valid domain. You can than then retry HTTPMethod from your > program as many times as you want and find reasonable. Don't try to do > this in the OnStatus method ;) > >> Wait for a reply, before sending any new quest, synchronized among all >> threads? >> Cache all queries from all threads, and only send one query for each host? >> > You would have the same issue when several programs or several computers > do such a request in the same time over the same router. No local > solution will be able to avoid it. Only retry when fail is a robust > solution. > > Ludo > > ------------------------------------------------------------------------------ > LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial > Remotely access PCs and mobile devices and provide instant support > Improve your efficiency, and focus on delivering more value-add services > Discover what IT Professionals Know. Rescue delivers > http://p.sf.net/sfu/logmein_12329d2d > _______________________________________________ > synalist-public mailing list > synalist-public@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/synalist-public > ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnmore_123012 _______________________________________________ synalist-public mailing list synalist-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synalist-public