R
Railway11mo 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
Percy11mo ago
Project ID: 50bac420-0946-41bc-9b51-f3bda884becd
Caillou
CaillouOP11mo ago
* App works perfectly in localhost, no changes are maded in last 10 days, suddenly started
Brody
Brody11mo ago
what kind of server error?
Caillou
CaillouOP11mo ago
No description
Brody
Brody11mo ago
zero logs of any kind?
Caillou
CaillouOP11mo ago
0
No description
Caillou
CaillouOP11mo ago
nothing
Brody
Brody11mo ago
that's definitely not zero
Caillou
CaillouOP11mo ago
yep, it's zero, the first line occours since 10/2022
Adam
Adam11mo 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
CaillouOP11mo ago
error log says server error, but in output no errors are showed
Brody
Brody11mo ago
doesn't always mean there are going to be error logs what's your start script in your package.json
Adam
Adam11mo ago
you are listening on localhost, listen on 0.0.0.0 instead
Brody
Brody11mo 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
Adam11mo ago
No description
Adam
Adam11mo ago
I love documentation
Caillou
CaillouOP11mo 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
Adam11mo ago
what is your start script? no, they haven’t
Caillou
CaillouOP11mo ago
Apparently my build configurations were deleted from the dashboard... I'm still checking
Adam
Adam11mo ago
should be in your package.json
Caillou
CaillouOP11mo 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
Brody11mo ago
Caillou, please send your start script
Caillou
CaillouOP11mo 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
Brody11mo ago
update the start script to what is in the image adam sent please
Adam
Adam11mo ago
^
Caillou
CaillouOP11mo ago
nothing changed...
No description
Brody
Brody11mo ago
do you have any build or start commands set in the service settings?
Caillou
CaillouOP11mo ago
only build
prisma generate && npm run build
prisma generate && npm run build
Brody
Brody11mo ago
do you have a Procfile?
Caillou
CaillouOP11mo ago
no
Brody
Brody11mo 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
CaillouOP11mo 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
Brody11mo ago
show me your scripts please
Caillou
CaillouOP11mo ago
. These are the default scripts, all changes were made trying to solve this problem.
Brody
Brody11mo ago
please follow my instructions
Adam
Adam11mo ago
We asked for you to change your start script in your package.json to --port ${PORT}
Caillou
CaillouOP11mo ago
this do not work
Adam
Adam11mo ago
not to -p 3000
Caillou
CaillouOP11mo ago
Nextjs startup parameters are different from node, -p is equivalent to Node's -port
Brody
Brody11mo ago
this is not my first rodeo
Adam
Adam11mo ago
The instructions I sent are specifically for next Please follow them
Brody
Brody11mo ago
and please remove any start command you may have set anywhere other than in your package.json
Caillou
CaillouOP11mo 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
Brody11mo 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
CaillouOP11mo ago
14 minutes and the build process wasn't even halfway through
Brody
Brody11mo ago
odd but looks harmless
Caillou
CaillouOP11mo ago
This normally takes a maximum of 5 minutes
Brody
Brody11mo ago
@matt - possible builder slowdown
Caillou
CaillouOP11mo ago
build finished in 20 minutes, waiting for deploy ending...
Caillou
CaillouOP11mo ago
Even using the specified parameter the problem persists
No description
Brody
Brody11mo ago
show me your scripts please
Caillou
CaillouOP11mo 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
Brody11mo ago
that is not the correct start script
Caillou
CaillouOP11mo ago
??
Brody
Brody11mo ago
I don't know how you think you have the same start script
Caillou
CaillouOP11mo 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
Brody11mo ago
yes 100% please use the correct start script as shown in the docs and the screenshot
Caillou
CaillouOP11mo ago
I'll arrange a migration to Vercel, I've already had a huge loss trying to resolve this, thanks anyway.
Brody
Brody11mo ago
it's a simple configuration issue
Adam
Adam11mo 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
Brody11mo ago
I'm sorry you've had difficulties but we have only tried to help you and we have been meet with pushback
Caillou
CaillouOP11mo ago
I tried the last time and the problem still persists, even though I set the dynamic port as requested.
Brody
Brody11mo ago
show me your scripts now please?
Caillou
CaillouOP11mo 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
Brody11mo ago
i dont have teamviewer downloaded right now, give me time to download it and id be happy to help you that way
matt
matt11mo ago
looks like there was a problem with a single builder ~40 minutes ago but that was resolved and everything looks good rn
Brody
Brody11mo 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
matt11mo ago
great work here, Brody
Brody
Brody11mo 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
CaillouOP11mo 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
Brody11mo 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
Caillou11mo 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
Brody11mo 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
CaillouOP11mo ago
No problem, it's part of the job, it's a really difficult scenario to make any assumptions about.
Brody
Brody11mo ago
well I'm glad you where about to figure it out!!
Caillou
CaillouOP11mo ago
can you mark solution? the option do not show for my
No description
Brody
Brody11mo ago
yeah only mods can mark solutions, had too many users marking the wrong message as the solution.
Want results from more Discord servers?
Add your server