error: stream is not readable
I have a NextJS app with a Headless CMS, Strapi. I host Strapi on railway.
In my NextJS application I have a revalidate functions for my blogs. So after a hit on the page, NextJS will create a new page in the background. And will also do a request to Strapi via graphql
So I tested it, by hitting 100 pages. So the revalidate will start. When I looked in the Railway logs it is in some kind of loop.
Someone knows how to fix this error? id: 667fe179-f101-4dcd-9838-bdf2bdca173a
`[2023-12-29 09:01:46.994] http: POST /graphql (40977 ms) 200
[2023-12-29 09:01:47.340] http: POST /graphql (40582 ms) 200
[2023-12-29 09:01:50.955] http: POST /graphql (41459 ms) 200
[2023-12-29 09:01:51.421] error: stream is not readable
InternalServerError: stream is not readable
at readStream (/app/node_modules/raw-body/index.js:185:17)
at executor (/app/node_modules/raw-body/index.js:120:5)
at new Promise (<anonymous>)
at getRawBody (/app/node_modules/raw-body/index.js:119:10)
at module.exports [as json] (/app/node_modules/koa-bodyparser/node_modules/co-body/lib/json.js:39:21)
at parseBody (/app/node_modules/koa-bodyparser/index.js:99:26)
at bodyParser (/app/node_modules/koa-bodyparser/index.js:80:25)
at /app/node_modules/apollo-server-koa/dist/ApolloServer.js:15:16
at dispatch (/app/node_modules/koa-compose/index.js:42:32)
at /app/node_modules/apollo-server-koa/dist/ApolloServer.js:18:16
[2023-12-29 09:01:51.502] http: POST /graphql (41996 ms) 200
[2023-12-29 09:01:51.721] error: stream is not readable
InternalServerError: stream is not readable
2 Replies