Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable curl's IPv6 host name resolution #44

Closed
SteveTherrien opened this issue Aug 6, 2020 · 1 comment · Fixed by #45
Closed

Disable curl's IPv6 host name resolution #44

SteveTherrien opened this issue Aug 6, 2020 · 1 comment · Fixed by #45

Comments

@SteveTherrien
Copy link
Contributor

I'm running into a problem where my application logs this error with phpcent several times each day:

cURL error: Resolving timed out after 2512 milliseconds

I'm using an internal DNS server and the timeout is 2s. We're IPv4 internally and don't use/publish IPv6 records.

Forcing IPv4 resolution with curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4); solves the problem, and haven't had a single error in over 20 days, but that capability isn't exposed.

Would it be possible to let this option be set?

@FZambia
Copy link
Member

FZambia commented Aug 6, 2020

@SteveTherrien hello, could you send pr? I suppose sth like forceIpResolveV4 method makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants