Next.js Discord

Discord Forum

Next.js 500 internal server error which occurs from time to timw

Unanswered
Scottish Fold posted this in #help-forum
Open in Discord
Scottish FoldOP
Hi Next.js team, please help me regarding this annoying error. From time to time I get 500 internal server error.
When I reload error dissapear.
https://www.montre-shop.com/
Github: https://github.com/nikolamirilo/NextJS_Portfolio_WebApp
Please help,

6 Replies

Scottish FoldOP
I checked but I cannont conclude from them anythin:
Problem is that this is happening from time to time on initial load of app
Scottish FoldOP
It is connected to MongoDB connection. Full log:
Unhandled Promise Rejection {"errorType":"Runtime.UnhandledPromiseRejection","errorMessage":"MongoServerSelectionError: Server selection timed out after 30000 ms","reason":{"errorType":"MongoServerSelectionError","errorMessage":"Server selection timed out after 30000 ms","reason":{"type":"ReplicaSetNoPrimary","servers":{},"stale":false,"compatible":true,"heartbeatFrequencyMS":10000,"localThresholdMS":15,"setName":"atlas-nptmoq-shard-0","maxElectionId":null,"maxSetVersion":null,"commonWireVersion":0,"logicalSessionTimeoutMinutes":null},"stack":["MongoServerSelectionError: Server selection timed out after 30000 ms"," at Timeout._onTimeout (/var/task/node_modules/mongodb/lib/sdam/topology.js:278:38)"," at listOnTimeout (node:internal/timers:569:17)"," at process.processTimers (node:internal/timers:512:7)"]},"promise":{},"stack":["Runtime.UnhandledPromiseRejection: MongoServerSelectionError: Server selection timed out after 30000 ms"," at process.<anonymous> (file:///var/runtime/index.mjs:1276:17)"," at process.emit (node:events:529:35)"," at emit (node:internal/process/promises:149:20)"," at processPromiseRejections (node:internal/process/promises:283:27)"," at process.processTicksAndRejections (node:internal/process/task_queues:96:32)"]}
Error: Runtime exited with error: exit status 128 (Unhandled Promise Rejection)
Can someone please help @Cane Corso ?