http client GET with err : dial tcp:look up xxxxx: Temporary failure in name resolution
535 views
Skip to first unread message
Youqi yu
unread,
Aug 26, 2018, 11:47:19 AM8/26/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golang-nuts
Hi :
as the topic, did anyone met this problem before? I set http client timeout for 2 second, generally It works fine. But sometimes It blocked for more than 4 minutes ,even 14minutes. The goroutines keeps inc as many requests come in. After that block time all request return this error. I think it's dns lookup block. But I try to make my http client lookup my own DNS server which sleep 1 minute for each dns request, the client always returns in timeout. I can't reproduce the bug. It appears randomly on my online APP.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golang-nuts
Hi, try running your code in a debugger, it smells like a DNS resolution failing, leaving your code awaiting a response. In a debugger you would be able to see this happening