Next Js with Custom Server, page load take 2-5 minutes
Answered
American black bear posted this in #help-forum
American black bearOP
i've next js with custom server, while i open "http://localhost:3000/cashier", page loading so slow, on the terminal, i see
after 2 - 4 minutes, the page loaded, sometime i see error on the terminal
but, in another route, it's 1-2 minutes (still very slow for me), but i never see error
in production mode, it's work as well
○ Compiling /cashier ...
✓ Compiled /cashier in 3.9s (2626 modules)
after 2 - 4 minutes, the page loaded, sometime i see error on the terminal
GET /cashier 200 in 106952ms
⨯ uncaughtException: [Error: read ECONNRESET] {
errno: -54,
code: 'ECONNRESET',
syscall: 'read'
}
⨯ uncaughtException: [Error: read ECONNRESET] {
errno: -54,
code: 'ECONNRESET',
syscall: 'read'
}
[nodemon] app crashed - waiting for file changes before starting...
but, in another route, it's 1-2 minutes (still very slow for me), but i never see error
in production mode, it's work as well
Answered by American black bear
solved, the problem is because i use winston logger or rabbitmq client in the server
3 Replies
American black bearOP
here's the server
after route /cashier loaded, if i go to another route and go back to /cashier, it's work as well, but first time i go to /cashier, it's take a long time or even crash
American black bearOP
solved, the problem is because i use winston logger or rabbitmq client in the server
Answer