2 years ago
I deployed my Next.js app to Railway after successfully building it on my local machine. The app connects to a WordPress backend running in headless mode on a 20i.com shared hosting server. However, upon deployment to Railway, the app encounters a recurring error due to a GraphQL request issue. This error does not occur when deploying the same codebase to Digital Ocean, and the app functions as expected there.
Here are the key details of the error message:
at onNotify (/app/node_modules/zen-observable/lib/Observable.js:179:3)
at SubscriptionObserver.error (/app/node_modules/zen-observable/lib/Observable.js:240:7) {
graphQLErrors: [],
protocolErrors: [],
clientErrors: [],
networkError: Error [ServerError]: Response not successful: Received status code 429
at Object.throwServerError (/app/node_modules/@apollo/client/link/utils/utils.cjs:46:17)
at parseJsonBody (/app/node_modules/@apollo/client/link/http/http.cjs:290:15)
at /app/node_modules/@apollo/client/link/http/http.cjs:314:48
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
response: Response {
[Symbol(realm)]: null,
[Symbol(state)]: [Object],
[Symbol(headers)]: [HeadersList]
},
statusCode: 429,
result: '\n' +
'\n' +
'<title>429 Too Many Requests</title>\n' +
'\n' +
'<h1>Too Many Requests</h1>\n' +
'<p>The user has sent too many requests\n' +
'in a given amount of time.</p>\n' +
'\n'},
extraInfo: undefined,
cause: Error [ServerError]: Response not successful: Received status code 429
}
The error indicates a 429 Too Many Requests status code, which suggests that Railway may be sending a higher number of requests in a short timeframe or there could be a rate-limiting issue in this specific environment. My WordPress backend (hosted on 20i.com shared hosting) serves as a headless CMS and provides the GraphQL endpoint for the app.
Steps to Reproduce:
Deploy a Next.js app that utilizes WordPress as a headless CMS via GraphQL.
Host the WordPress backend on a 20i.com shared hosting plan.
Deploy the app to Railway.
Observe the server error with a 429 status code.
Additional Information:
The same code works fine on Digital Ocean without any rate-limiting issues.
No significant differences in the deployment process were made between Railway and Digital Ocean.
The WordPress GraphQL endpoint works correctly on other hosting environments.
Request: Could you provide guidance on why the GraphQL requests might be triggering rate limits specifically on Railway, and any potential configurations or solutions to resolve this?
Thank you for your help.
Best regards,
> ⓘ Deployment information is only viewable by project members and Railway employees.
0 Replies