I’m experiencing weired behavior in my local network and/or internet connection.
It seems that some requests fail for unknown reasons. I’m experiencing this with different devices in my network, but the issues are gone if I connect to another network.
While this is not truly a ‘programming’ question, it significantly affects my ability to work/program properly.. So I don’t see any other options than asking for help here. I really hope you can help me.
The symptoms are the following:
- GraphQl requests are failing sometimes to certain servers, e.g.
curl 'https://graphql.datocms.com/'
-H 'Authorization: 12345'
-H 'Content-Type: application/json'
-H 'Accept: application/json'
--data-binary '{ "query": "query { allPosts { title } }" }'
curl: (35) Recv failure: Connection reset by peer
If I try this multiple times, about 50% of the requests fail. If I do the query from a node application, it sometimes fails with this:
➜ node query.js
node:internal/deps/undici/undici:12502
Error.captureStackTrace(err, this);
^
TypeError: fetch failed
at node:internal/deps/undici/undici:12502:13
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
[cause]: Error: read ECONNRESET
at TLSWrap.onStreamRead (node:internal/stream_base_commons:218:20) {
errno: -54,
code: 'ECONNRESET',
syscall: 'read'
}
}
For other servers it seems to always work, e.g:
curl --location 'https://swapi-graphql.netlify.app/.netlify/functions/index'
--header 'Content-Type: application/json'
--data '{"query":"{rn allFilms {rn films {rn titlern }rn }rn}","variables":{}}'
{"data":{"allFilms":{"films":[{"title":"A New Hope"},{"title":"The Empire Strikes Back"},{"title":"Return of the Jedi"},{"title":"The Phantom Menace"},{"title":"Attack of the Clones"},{"title":"Revenge of the Sith"}]}}}
-
Other tools that download something, sometimes fail
If I try it again, it would work at some point -
Some requests on websites sometimes fail
Again, this only happens sometimes.
What I’ve tried so far:
- Restart Router, restart Laptop, reset Router to factory settings. No effect.
- Try with different devices (2 Macbooks, Windows Laptop) in the same network. Same behavior.
- Try with cable instead of wifi. No effect.
- Connect to shared hotspot from my phone via LTE. Issue gone!
- Look for suspicious settings in the router interface, didn’t find anything, but also wasn’t sure what to look for.
- Speed-test, e.g. on https://www.speedtest.net/de. Looks all good.
ping google.com
. This looks like this:
➜ exp ping google.com
PING google.com (172.217.16.174): 56 data bytes
64 bytes from 172.217.16.174: icmp_seq=0 ttl=116 time=11.254 ms
64 bytes from 172.217.16.174: icmp_seq=1 ttl=116 time=11.364 ms
64 bytes from 172.217.16.174: icmp_seq=2 ttl=116 time=12.189 ms
After about ~50 calls, sometimes I get a Request timeout for icmp_seq 75
I think the issues just started today at some point, during the last weeks everything was working as expected, as far as I can tell. So it might just be an issues with my provider? (o2 in Germany)
I really really hope you can help me or point me into a direction on how to approach this issue. Thank you so much!