curl-library
Re: curl-library Digest, Vol 109, Issue 31
Date: Mon, 22 Sep 2014 16:42:05 -0400
>
>
> Message: 1
> Date: Sat, 20 Sep 2014 23:35:38 +0200 (CEST)
> From: Daniel Stenberg <daniel_at_haxx.se>
> To: libcurl development <curl-library_at_cool.haxx.se>
> Subject: Re: Sporadic "Couldn't resolve host" error on windows with
> libcurl 7.30.0
> Message-ID: <alpine.DEB.2.00.1409202328030.28805_at_tvnag.unkk.fr>
> Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
>
> On Fri, 19 Sep 2014, arif khan wrote:
>
> > To narrow down the problem I wrote a multi-threaded app which runs 100
> > threads, in each thread if requests http page in a loop of range 1000. In
> > total 100000 requests, I can see 6-10 requests fails with above error.
>
> Sounds like it could potentially be running out of some resources? I think
> it
> would help if you figured out exactly which function call that returns
> failure, as I suspect it is actually the underlying getaddrinfo() that
> returns
> failure and then it feels like the problem is in Windows and not in
> libcurl.
>
>
Thank you for comments.
Yes it is getaddrinfo(). I will try to find the problem if this is
something with running out of resource.
> > Interestingly I do not see such error on linux 64 bit machine in the same
> > network with locally compiled libcurl 7.30.0.
>
> That's another indication that it might not be libcurl that considers this
> an
> error, as the code running on linux is almost identical to the code
> running on
> windows.
>
> But which resolver backend did you use in the linux case? It'd be a good
> test
> if you made sure the linux case also used the threaded resolver backend.
>
>
On linux I compiled with
CFLAGS="-fPIC " ./configure --disable-ldap --without-zlib
curl --version
curl 7.30.0 (x86_64-unknown-linux-gnu) libcurl/7.30.0 OpenSSL/0.9.7d
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp
smtp smtps telnet tftp
Features: IPv6 Largefile SSL
gcc version 3.3.3 (SuSE Linux)
Welcome to SUSE LINUX Enterprise Server 9 (x86_64) - Kernel \r (\l).
Not sure how to know which resolver is being used.
One thing I need to mention that although linux and windows machines are on
the same network but they use different DNS server.
Tried to use curl tracing, but there is no tracing log when Couldn't
resolve host is occured. Subsequent request (next curl request) works fine.
Today I tried again 100 threads, 1000 range in a loop in each thread. Found
5 resolve host error out of 100x1000 requests.
I will keep investigating if I can find any clue, it may take some time.
Thread=52, iteration = 930, status = ok
Thread=18, iteration = 931, status = ok
Thread=94, iteration = 889, status = ok
Thread=9, iteration = 891, status = ok
Thread=83, iteration = 898, status = ok
Curl: Error setting options/performing in curl, error details: Couldn't
resolve host name, Could not resolve host: ...
Curl: Error setting options/performing in curl, error details: Couldn't
resolve host name, Could not resolve host: ...
Thread=68, iteration = 909, status = failed
Thread=22, iteration = 908, status = failed
Curl: Error setting options/performing in curl, error details: Couldn't
resolve host name, Could not resolve host: ..
Thread=84, iteration = 938, status = failed
Curl: Error setting options/performing in curl, error details: Couldn't
resolve host name, Could not resolve host: ...
Thread=59, iteration = 885, status = failed
Curl: Error setting options/performing in curl, error details: Couldn't
resolve host name, Could not resolve host: ..
Thread=98, iteration = 888, status = failed
[Thread 16]=> Send header[Thread 16]=> Send header, 0000000064 bytes
(0x00000040)
0000: GET / HTTP/1.1
0010: Host: bu-sonne.lss.emc.com:9000
0031: Accept: */*
003e:
[Thread 16]<= Recv header[Thread 16]<= Recv header, 0000000017 bytes
(0x00000011)
0000: HTTP/1.1 200 OK
[Thread 16]<= Recv header[Thread 16]<= Recv header, 0000000037 bytes
(0x00000025)
0000: Date: Sat, 20 Sep 2014 03:15:51 GMT
[Thread 16]<= Recv header[Thread 16]<= Recv header, 0000000030 bytes
(0x0000001e)
0000: Server: Apache/2.2.25 (Unix)
[Thread 16]<= Recv header[Thread 16]<= Recv header, 0000000046 bytes
(0x0000002e)
0000: Last-Modified: Sun, 14 Sep 2014 17:40:43 GMT
[Thread 16]<= Recv header[Thread 16]<= Recv header, 0000000030 bytes
(0x0000001e)
0000: ETag: "a1-9cd-5030a0476bcc0"
[Thread 22]=> Send header[Thread 22]=> Send header, 0000000064 bytes
(0x00000040)
0000: GET / HTTP/1.1
0010: Host: bu-sonne.lss.emc.com:9000
0031: Accept: */*
003e:
[Thread 16]<= Recv header[Thread 16]<= Recv header, 0000000022 bytes
(0x00000016)
0000: Accept-Ranges: bytes
[Thread 16]<= Recv header[Thread 16]<= Recv header, 0000000022 bytes
(0x00000016)
0000: Content-Length: 2509
[Thread 16]<= Recv header[Thread 16]<= Recv header, 0000000025 bytes
(0x00000019)
0000: Content-Type: text/html
[Thread 16]<= Recv header[Thread 16]<= Recv header, 0000000002 bytes
(0x00000002)
0000:
[Thread 22]<= Recv header[Thread 22]<= Recv header, 0000000017 bytes
(0x00000011)
0000: HTTP/1.1 200 OK
[Thread 22]<= Recv header[Thread 22]<= Recv header, 0000000037 bytes
(0x00000025)
-- > > / daniel.haxx.se > >
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-09-22