R
Railway6mo ago
Caillou

Server error but no logs found

Service ID: 50bac420-0946-41bc-9b51-f3bda884becd
Solution:
To close this topic and contribute to future similar cases: The real problem was that the site was suffering a DDoS attack, which caused the process to simply freeze, this was only noticed today at 10 am as the resources on Vercel's Hobby plan had been completely exhausted. The attack in question has already been resolved after increasing the security level at the DNS provider (Cloudflare) and configuring the rules for the API. After the end of my vacation I will possibly return the service to Railway, thank you for your availability....
No description
No description
Jump to solution
82 Replies
Percy
Percy6mo ago
Project ID: 50bac420-0946-41bc-9b51-f3bda884becd
Caillou
Caillou6mo ago
* App works perfectly in localhost, no changes are maded in last 10 days, suddenly started
Brody
Brody6mo ago
what kind of server error?
Caillou
Caillou6mo ago
No description
Brody
Brody6mo ago
zero logs of any kind?
Caillou
Caillou6mo ago
0
No description
Caillou
Caillou6mo ago
nothing
Brody
Brody6mo ago
that's definitely not zero
Caillou
Caillou6mo ago
yep, it's zero, the first line occours since 10/2022
Adam
Adam6mo ago
The timestamps say jan 2nd… that’s today I’m a bit confused by what you mean by zero logs when there’s clearly logs
Caillou
Caillou6mo ago
error log says server error, but in output no errors are showed
Brody
Brody6mo ago
doesn't always mean there are going to be error logs what's your start script in your package.json
Adam
Adam6mo ago
you are listening on localhost, listen on 0.0.0.0 instead
Brody
Brody6mo ago
fairly certain next does listen on 0.0.0.0 anyway but just says localhost so you can actually visit the logged link. but what I don't think next does is listen on PORT, and for that we need to wait until my question is answered
Adam
Adam6mo ago
No description
Adam
Adam6mo ago
I love documentation
Caillou
Caillou6mo ago
Has the railway made any infrastructure changes in the last 24 hours? because it doesn't make any sense that everything has stopped working.
Adam
Adam6mo ago
what is your start script? no, they haven’t
Caillou
Caillou6mo ago
Apparently my build configurations were deleted from the dashboard... I'm still checking
Adam
Adam6mo ago
should be in your package.json
Caillou
Caillou6mo ago
Nothing has changed, even when returning with my personalized configuration I still receive "Application failed to respond" All scripts are Next.js defaults (next build/start)
Brody
Brody6mo ago
Caillou, please send your start script
Caillou
Caillou6mo ago
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
Everything else is done by Nextjs itself
Brody
Brody6mo ago
update the start script to what is in the image adam sent please
Adam
Adam6mo ago
^
Caillou
Caillou6mo ago
nothing changed...
No description
Brody
Brody6mo ago
do you have any build or start commands set in the service settings?
Caillou
Caillou6mo ago
only build
prisma generate && npm run build
prisma generate && npm run build
Brody
Brody6mo ago
do you have a Procfile?
Caillou
Caillou6mo ago
no
Brody
Brody6mo ago
you are overwriting your start script, you have a start command set elsewhere
╔═══════════════ Nixpacks v1.20.0 ══════════════╗
║ setup │ nodejs_18, npm-8_x, openssl ║
║───────────────────────────────────────────────║
║ install │ npm ci ║
║───────────────────────────────────────────────║
║ build │ prisma generate && npm run build ║
║───────────────────────────────────────────────║
║ start │ next start -p 3000 ║
╚═══════════════════════════════════════════════╝
╔═══════════════ Nixpacks v1.20.0 ══════════════╗
║ setup │ nodejs_18, npm-8_x, openssl ║
║───────────────────────────────────────────────║
║ install │ npm ci ║
║───────────────────────────────────────────────║
║ build │ prisma generate && npm run build ║
║───────────────────────────────────────────────║
║ start │ next start -p 3000 ║
╚═══════════════════════════════════════════════╝
Caillou
Caillou6mo ago
Yes, because you asked earlier Regardless of the configuration used, it doesn't work, this is not within my power, the service simply stopped working without any changes to the code/dashboard.
Brody
Brody6mo ago
show me your scripts please
Caillou
Caillou6mo ago
. These are the default scripts, all changes were made trying to solve this problem.
Brody
Brody6mo ago
please follow my instructions
Adam
Adam6mo ago
We asked for you to change your start script in your package.json to --port ${PORT}
Caillou
Caillou6mo ago
this do not work
Adam
Adam6mo ago
not to -p 3000
Caillou
Caillou6mo ago
Nextjs startup parameters are different from node, -p is equivalent to Node's -port
Brody
Brody6mo ago
this is not my first rodeo
Adam
Adam6mo ago
The instructions I sent are specifically for next Please follow them
Brody
Brody6mo ago
and please remove any start command you may have set anywhere other than in your package.json
Caillou
Caillou6mo ago
The build process is insanely slow, it took almost 15 minutes and we didn't even get to the build of the project itself It seems to me like it's in a loop, every 5 minutes it prints:
╔═══════════════ Nixpacks v1.20.0 ══════════════╗

║ setup │ nodejs_18, npm-8_x, openssl ║

║───────────────────────────────────────────────║

║ install │ npm ci ║

║───────────────────────────────────────────────║

║ build │ prisma generate && npm run build ║

║───────────────────────────────────────────────║

║ start │ npm run start ║

╚═══════════════════════════════════════════════╝
╔═══════════════ Nixpacks v1.20.0 ══════════════╗

║ setup │ nodejs_18, npm-8_x, openssl ║

║───────────────────────────────────────────────║

║ install │ npm ci ║

║───────────────────────────────────────────────║

║ build │ prisma generate && npm run build ║

║───────────────────────────────────────────────║

║ start │ npm run start ║

╚═══════════════════════════════════════════════╝
on stdout
Brody
Brody6mo ago
your issue is not related to theirs please do no hijack others threads that are unrelated moving on, show me a screenshot of the repeated logs please
Caillou
Caillou6mo ago
14 minutes and the build process wasn't even halfway through
Brody
Brody6mo ago
odd but looks harmless
Caillou
Caillou6mo ago
This normally takes a maximum of 5 minutes
Brody
Brody6mo ago
@matt - possible builder slowdown
Caillou
Caillou6mo ago
build finished in 20 minutes, waiting for deploy ending...
Caillou
Caillou6mo ago
Even using the specified parameter the problem persists
No description
Brody
Brody6mo ago
show me your scripts please
Caillou
Caillou6mo ago
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start --port 3000",
"lint": "next lint"
},
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start --port 3000",
"lint": "next lint"
},
Brody
Brody6mo ago
that is not the correct start script
Caillou
Caillou6mo ago
??
Brody
Brody6mo ago
I don't know how you think you have the same start script
Caillou
Caillou6mo ago
My friend, the service worked until 18:05 (UTC-3), at 18:06 it stops working without any changes, would this really be my configuration problem?
Brody
Brody6mo ago
yes 100% please use the correct start script as shown in the docs and the screenshot
Caillou
Caillou6mo ago
I'll arrange a migration to Vercel, I've already had a huge loss trying to resolve this, thanks anyway.
Brody
Brody6mo ago
it's a simple configuration issue
Adam
Adam6mo ago
Agreed, we’ve told you to change your script to pull from the PORT environment variable. NOT set the port to 3000 this is an extremely simple change
Brody
Brody6mo ago
I'm sorry you've had difficulties but we have only tried to help you and we have been meet with pushback
Caillou
Caillou6mo ago
I tried the last time and the problem still persists, even though I set the dynamic port as requested.
Brody
Brody6mo ago
show me your scripts now please?
Caillou
Caillou6mo ago
Aqui está minha ID TeamViewer e senha de conexão. Por favor, use esses dados para iniciar uma sessão de suporte remoto comigo. ID TeamViewer: 1 261 830 xxx
Brody
Brody6mo ago
i dont have teamviewer downloaded right now, give me time to download it and id be happy to help you that way
matt
matt6mo ago
looks like there was a problem with a single builder ~40 minutes ago but that was resolved and everything looks good rn
Brody
Brody6mo ago
perfect, thanks for checking update after teamviewer, there is a bigger issue at play with their code, it uses far too much cpu and mem and is softlocking itself
matt
matt6mo ago
great work here, Brody
Brody
Brody6mo ago
no not great, i did not find a fix they are going to try deploying to vercel, vercel will pull some magic strings and their code will likely work just fine over there
Caillou
Caillou6mo ago
I was transferring the DNS settings and noticed that Railway had started working again, but after 1~2 minutes it stopped again. Quite strange Ah, it just started working again, it looks like some kind of wobble
Brody
Brody6mo ago
while I agree this is super strange, from looking at your service metrics the issue is something along the lines of your app is soft locking itself as opposed to an issue with railway, and again I wish I knew the issue so I could help you more here
Solution
Caillou
Caillou6mo ago
To close this topic and contribute to future similar cases: The real problem was that the site was suffering a DDoS attack, which caused the process to simply freeze, this was only noticed today at 10 am as the resources on Vercel's Hobby plan had been completely exhausted. The attack in question has already been resolved after increasing the security level at the DNS provider (Cloudflare) and configuring the rules for the API. After the end of my vacation I will possibly return the service to Railway, thank you for your availability.
No description
No description
Brody
Brody6mo ago
oh wow, so I was only half right. your app was indeed soft locking, but it wasn't from any bad code. I'm deeply sorry for making that particular assumption
Caillou
Caillou6mo ago
No problem, it's part of the job, it's a really difficult scenario to make any assumptions about.
Brody
Brody6mo ago
well I'm glad you where about to figure it out!!
Caillou
Caillou6mo ago
can you mark solution? the option do not show for my
No description
Brody
Brody6mo ago
yeah only mods can mark solutions, had too many users marking the wrong message as the solution.