TackleMcClean 🏅
08/14/2024, 3:55 PM/media
images for Nextjs next-image consumption.
We seem to very often overload Umbraco/dotnet, resulting in Nextjs fetch
requests that returns:
TypeError: fetch failed
at Object.fetch (node:internal/deps/undici/undici:11372:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async executor (webpack-internal:///./src/functions/graphql/getRemoteSchema.js:16:29)
at async Promise.all (index 1)
at async Promise.all (index 1)
at async Promise.all (index 1)
at async Promise.all (index 0)
at async Promise.all (index 3)
at async Promise.all (index 4)
at async Promise.all (index 124) {
cause: Error: connect ECONNREFUSED 192.168.65.254:8080
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1595:16) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '192.168.65.254',
port: 8080
}
}
This is actually from local dev environment so we can recreate this. But prod shows similar as well.
Does anyone know how to troubleshoot something like this?
I don't know if either dotnet by default, or Umbraco, rate limits requests?
Our RAM and CPU consumption is all fine below 50% on both.
No error output from the dotnet run
process. No errors in `umbraco/Logs`/Log viewer either.
We are at a loss with intermittent site outage. Any suggestion is appreciated!D_Inventor
08/14/2024, 4:57 PMbielu
08/14/2024, 5:24 PMTackleMcClean 🏅
08/14/2024, 6:42 PMTackleMcClean 🏅
08/14/2024, 6:42 PMD_Inventor
08/14/2024, 6:45 PMTackleMcClean 🏅
08/14/2024, 6:46 PMbielu
08/14/2024, 6:51 PMTackleMcClean 🏅
08/14/2024, 6:52 PMTackleMcClean 🏅
08/14/2024, 6:52 PMbielu
08/14/2024, 6:53 PMbielu
08/14/2024, 7:19 PMTackleMcClean 🏅
08/14/2024, 7:36 PMTackleMcClean 🏅
08/14/2024, 7:36 PMTackleMcClean 🏅
08/14/2024, 8:10 PMNik
08/14/2024, 11:13 PMTackleMcClean 🏅
08/15/2024, 6:19 AMkdx-perbol
08/15/2024, 7:06 AMWEBSITE_VNET_ROUTE_ALL
routes all outgoing traffic through the virtual network. https://learn.microsoft.com/en-us/azure/app-service/configure-vnet-integration-routingkdx-perbol
08/15/2024, 7:08 AMkdx-perbol
08/15/2024, 7:08 AMbielu
08/15/2024, 7:09 AMTackleMcClean 🏅
08/15/2024, 7:09 AMdotnet run
in my project folder. From what I know this only invokes Kestrel.kdx-perbol
08/15/2024, 7:10 AMkdx-perbol
08/15/2024, 7:12 AMTackleMcClean 🏅
08/15/2024, 7:12 AMTypeError: fetch failed
at Object.fetch (node:internal/deps/undici/undici:11372:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async executor (webpack-internal:///./src/functions/graphql/getRemoteSchema.js:19:29)
at async Promise.all (index 1)
at async Promise.all (index 1)
at async Promise.all (index 1)
at async Promise.all (index 0)
at async Promise.all (index 3)
at async Promise.all (index 4)
at async Promise.all (index 93) {
cause: Error: connect ECONNREFUSED 192.168.65.254:8080
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1595:16) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '192.168.65.254',
port: 8080
}
}
TackleMcClean 🏅
08/15/2024, 7:13 AMTackleMcClean 🏅
08/15/2024, 7:14 AMbielu
08/15/2024, 7:14 AMTackleMcClean 🏅
08/15/2024, 7:15 AMhost.docker.internal
, so the error above comes from a docker container talking to my "real" localhost, that's why you see that IP address.
From my browser I reach Umbraco from localhost:8080
TackleMcClean 🏅
08/15/2024, 7:15 AMTackleMcClean 🏅
08/15/2024, 7:16 AM2024-08-15T07:10:23.2190203Z TypeError: fetch failed
2024-08-15T07:10:23.2191069Z at node:internal/deps/undici/undici:13178:13
2024-08-15T07:10:23.2191141Z at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2024-08-15T07:10:23.2191194Z at async imageOptimizer (/app/node_modules/next/dist/server/image-optimizer.js:233:29)
2024-08-15T07:10:23.2191247Z at async /app/node_modules/next/dist/server/next-server.js:157:72
2024-08-15T07:10:23.2191293Z at async /app/node_modules/next/dist/server/response-cache.js:69:36 {
2024-08-15T07:10:23.2191340Z [cause]: AggregateError [ECONNREFUSED]:
2024-08-15T07:10:23.2191386Z at internalConnectMultiple (node:net:1118:18)
2024-08-15T07:10:23.2191462Z at afterConnectMultiple (node:net:1685:7)
2024-08-15T07:10:23.2191510Z at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
2024-08-15T07:10:23.2191554Z code: 'ECONNREFUSED',
2024-08-15T07:10:23.2191597Z [errors]: [ [Error], [Error] ]
2024-08-15T07:10:23.2191636Z }
2024-08-15T07:10:23.2191676Z }
TackleMcClean 🏅
08/15/2024, 7:17 AM/app/node_modules/next/dist/server/image-optimizer.js
line 233 to also log out what url it is trying to fetch, or at least catch the error, fully log it with more info, and then rethrow, not sure yet.bielu
08/15/2024, 7:18 AMkdx-perbol
08/15/2024, 7:18 AMbielu
08/15/2024, 7:18 AMkdx-perbol
08/15/2024, 7:19 AMbielu
08/15/2024, 7:21 AMTackleMcClean 🏅
08/15/2024, 7:21 AMTackleMcClean 🏅
08/15/2024, 7:21 AMbielu
08/15/2024, 7:22 AMkdx-perbol
08/15/2024, 7:25 AMTackleMcClean 🏅
08/15/2024, 7:26 AMbielu
08/15/2024, 7:27 AMTackleMcClean 🏅
08/15/2024, 7:30 AMbielu
08/15/2024, 7:31 AMTackleMcClean 🏅
08/15/2024, 7:33 AMbielu
08/15/2024, 7:34 AMbielu
08/15/2024, 7:35 AMTackleMcClean 🏅
08/15/2024, 7:36 AMTackleMcClean 🏅
08/15/2024, 7:36 AMTackleMcClean 🏅
08/15/2024, 7:38 AMTackleMcClean 🏅
08/15/2024, 7:52 AM/_next/image/
which is nextjs image optimization endpoint, so that checks out at least.