Libcurl stuck in POLLIN timeouts

libcurl in my php code seems to be stuck endlessly in a poll call. When I bind to the process id,

 [ user@server ~]$ sudo strace -p 19559 Process 19559 attached - interrupt to quit poll([{fd=7, events=POLLIN}], 1, 1000) = 0 (Timeout) poll([{fd=7, events=POLLIN}], 1, 0) = 0 (Timeout) poll([{fd=7, events=POLLIN}], 1, 1000) = 0 (Timeout) poll([{fd=7, events=POLLIN}], 1, 0) = 0 (Timeout) poll([{fd=7, events=POLLIN}], 1, 1000) = 0 (Timeout) poll([{fd=7, events=POLLIN}], 1, 0) = 0 (Timeout) poll([{fd=7, events=POLLIN}], 1, 1000) = 0 (Timeout) poll([{fd=7, events=POLLIN}], 1, 0) = 0 (Timeout) poll([{fd=7, events=POLLIN}], 1, 1000) = 0 (Timeout) 

This goes on forever. Fd 7 is shown in / proc / 19559 / fd as

 lrwx------ 1 root root 64 Sep 19 19:44 7 -> socket:[335178801] 

Can someone tell me why this is happening. What can I do to make libcurl exit when it expires

+6
source share
1 answer

curl_setopt option CURLOPT_CONNECTTIMEOUT , if set to a non-zero value, will make the twist fail in a timeout.

+6
source

Source: https://habr.com/ru/post/926284/


All Articles