[erlang-questions] use inet_res:getbyname get timeout when a lot of processes called

John Doe <>
Sat Oct 3 23:13:16 CEST 2015


DNS resolving is slow, DNS servers could throttle requests going from the
same IP. You would get this problem in any language. You would need to
rotate multiple DNS servers to make it work. Look at {nameservers, [
nameserver() <http://www.erlang.org/doc/man/inet_res.html#type-nameserver>]}
option.

2015-10-03 13:45 GMT+03:00 lili <>:

> Hi friends:
>    I write a little program to look up a number of host name's Address.
>    I create 1W process to lookup a lot of host's address.
>    case inet_res:getbyname(www.xxx.com, a) of
>    it return {error, timeout}. but when i one by one call getbyname is ok.
>    Who know this reason.
>
>
>
>
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20151004/35730991/attachment.html>


More information about the erlang-questions mailing list