What is the name of the domain?
http://betatest.localhost:5000/
What is the error number?
Timeout
What is the error message?
Network Error: timed out reading response
What is the issue you’re encountering
Suddenly, I get timeouts only for certain paths, but only if running outside my server
What steps have you taken to resolve the issue?
We have a rest API at /v1/api/login
that is causing timeouts. It only affects this path and the rest of the website(s) are fine.
The app server, with several tenants, is only in one server. This only happens with cloudflare on.
If we run http POST http://example.localhost:5000/v1/api/login user_name=_sync password=*** --verbose
it works fine as always inside the host.
Accessing outside it will answer inconsistently, sometimes in seconds, sometimes in several minutes.
localhost most definitely won’t go through Cloudflare. And Cloudflare won’t proxy Port 500 0 for public hostnames unless you’re an Enterprise customer using Spectrum.
What does the web server http logs show?
2 Likes
Sorry, I put localhost because i can show the real website because is my login endpoint affected
Ok, thi looks like is a problem with ipv6, if using `httpie, wget’ the problem fails, but with curl works:
❯ wget --debug --header="Content-Type: application/json" \
--post-data='{
"user_name": "_sync",
"password": "***",
}' \
https://****/v1/api/login
Setting --header (header) to Content-Type: application/json
DEBUG output created by Wget 1.21.4 on darwin22.6.0.
--2024-08-03 15:49:02-- https://://****//v1/api/login
Resolving ..... 2606:4700..., 2606:4700:.., 172.67....
Connecting to ..|2606:4700...|:443... Closed fd 5
failed: Operation timed out.
Connecting to ..|2606:4700:|:443... Closed fd 5
failed: Operation timed out.
Connecting to ..|172.67....|:443... connected.
Created socket 5.
Releasing 0x0000600002463100 (new refcount 1).
Initiating SSL handshake.
Handshake successful; connected socket 5 to SSL handle 0x000000011a808200
---request begin---
POST /v1/api/login HTTP/1.1
---response begin---
HTTP/1.1 200 OK
However:
❯ curl -v -X POST https://****/v1/api/login \
-H "Content-Type: application/json" \
-d '{
"user_name": "_sync",
"password": "***",
}'
* processing: https://***/v1/api/login
* Trying [2606:4700***]:443...
* Trying 172.67***:443...
* Connected to **** (172.67***) port 443
* ALPN: offers h2,http/1.1
*
* using HTTP/2
> POST /v1/api/login HTTP/2
>
< HTTP/2 200
< date: Sat, 03 Aug 2024 21:07:06 GMT
< content-type: application/json
The server logs not shows until the timeouts are cleared, ie: I do the request, then 3 minutes later it arrives at my server.
So, this looks to me like an issue with Cloudflare, that is the one given the wrong ipv6 ips…
system
Closed
August 18, 2024, 8:16pm
9
This topic was automatically closed after 15 days. New replies are no longer allowed.