Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Sporadic cURL error 28: Resolving timed out after 5000 milliseconds #761

nine-2-five started this conversation in General
Discussion options

Hi, I'm using WordPress FPM 8.0 with the official NGINX image as a reverse proxy. I'm getting cURL error 28: Resolving timed out after 5000 milliseconds, sporadically, on pages that use wp_remote_post to get data from an Express.js API in the same datacenter (but different domain). The proxy I believe can be excluded from this problem, because the same error was logged with Open LiteSpeed proxy also.
The wp_remote_post gets the data 99% of the time, but I'd still like to know why this error happens 10-20 times a day.
Also, I had the chance to call the API using Postman within seconds of error being logged, and it responded within 100ms on each call I made.

You must be logged in to vote

Replies: 1 comment

Comment options

I had this issue, it was caused by the container not being able to properly resolve to itself via my nginx revese proxy

the fix was to add the extra_hosts directive to the yaml for the container as so.

 wordpress:
 image: wordpress:latest
 ports:
 - 8080:80
 restart: always
 environment:
 WORDPRESS_DB_HOST: db:3306
 WORDPRESS_DB_USER: xxxxx
 WORDPRESS_DB_PASSWORD: xxxxxx
 WORDPRESS_DB_NAME: wordpressdb
 extra_hosts:
 - mydomain.com:<externa-facing-lip>
 volumes:
 - www:/var/www/html
 
You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Converted from issue

This discussion was converted from issue #740 on October 06, 2022 22:09.

AltStyle によって変換されたページ (->オリジナル) /