Node.js endpoint execution stops without reason.

Hello everybody, I have this function that works perfectly fine on my local environment, but for some reason it doesn't here on railway: I have this webhook that receives data and pass it to a class that could take up to 20minutes to process data, like this: Webhook.js -> Utility.js Problem is, the execution terminates inside Utility.js (without any errors) without passing back the control to Webhook.js, I suppose it's a container/ resource problem (I'm on hobby with 50 dollars of credit), it really preventing me to use my project. Any hints? Thanks
42 Replies
Percy
Percy•3mo ago
Project ID: 6b0f0506-09fb-47d1-9a76-e917fa00c004
expired_watermelon
expired_watermelonOP•3mo ago
6b0f0506-09fb-47d1-9a76-e917fa00c004
Brody
Brody•3mo ago
do you have a container died event in your logs?
expired_watermelon
expired_watermelonOP•3mo ago
appeared only when I restarted like container restarted and container died
Brody
Brody•3mo ago
then if you didn't get one while your app stopped the app didn't exit
expired_watermelon
expired_watermelonOP•3mo ago
No description
Brody
Brody•3mo ago
that's you initializing it
expired_watermelon
expired_watermelonOP•3mo ago
mm k, no I didn't get it got stuck on the last log of Utility.js class
Brody
Brody•3mo ago
are you aware of the resource limits of the Hobby plan?
expired_watermelon
expired_watermelonOP•3mo ago
8gb of RAM + 8v CPU + extra resource where can I see if the request exceded the resource limit? I have no problem paying more, but I need to know
Brody
Brody•3mo ago
you can look at the metrics, but your application may have had a resource spike that happened faster than we could have caught what's the max memory that it uses locally?
expired_watermelon
expired_watermelonOP•3mo ago
I'm running it on 32gb macbook pro I can do a benchmark if you want
Brody
Brody•3mo ago
yes please
expired_watermelon
expired_watermelonOP•3mo ago
k
Brody
Brody•3mo ago
you can always upgrade to pro and If that doesn't solve your problem I'd be happy to refund
expired_watermelon
expired_watermelonOP•3mo ago
sure, but I want to give you the benchmark first may help others if it's a bug can I upgrade to pro using credits?
Brody
Brody•3mo ago
nope it would have to be a card, but we can transfer credits over after the fact for you
expired_watermelon
expired_watermelonOP•3mo ago
mmm, cause right now I have just a pre-paid
Brody
Brody•3mo ago
you would need to use a card to purchase pro
expired_watermelon
expired_watermelonOP•3mo ago
this is the benchmark as stated here: https://nodejs.org/en/learn/getting-started/profiling
Node.js — Profiling Node.js Applications
Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.
expired_watermelon
expired_watermelonOP•3mo ago
By the way I've DMed you, we can talk better there I think, I'll upgrade, no problem
Brody
Brody•3mo ago
sorry but we don't offer support over DMs
expired_watermelon
expired_watermelonOP•3mo ago
I understand, sorry 😉
Brody
Brody•3mo ago
can you give me a rundown of that file? what was the max memory your app uses?
expired_watermelon
expired_watermelonOP•3mo ago
No description
expired_watermelon
expired_watermelonOP•3mo ago
this is the process consumption
Brody
Brody•3mo ago
zsh is a shell?
expired_watermelon
expired_watermelonOP•3mo ago
yep, I have an instance inside visual studio code
Brody
Brody•3mo ago
what does 47426 mean in this context?
expired_watermelon
expired_watermelonOP•3mo ago
pid
Brody
Brody•3mo ago
well isn't this idle usage?
expired_watermelon
expired_watermelonOP•3mo ago
nope, I sent the request on my local instace of the express app
Brody
Brody•3mo ago
but at the same time, there's no way an idle node app is only using 2.8mb, are you sure that's not the memory usage of zsh itself
expired_watermelon
expired_watermelonOP•3mo ago
Ok, I'm going to try a different method The script uses approximately 87.61 MB I used this: const used = process.memoryUsage().heapUsed / 1024 / 1024; At this point it's should be helpfull to check the logs inside the container on your side
Brody
Brody•3mo ago
we ship all the deployment logs your app prints out to deploy logs tab
expired_watermelon
expired_watermelonOP•3mo ago
ok, so any suggestions? Just upgrade?
Brody
Brody•3mo ago
if you think this is a memory issue, yep! if you don't think it's memory, I would recommend adding more verbose logging to your app
expired_watermelon
expired_watermelonOP•3mo ago
There are already I'll try again, thanks!
Brody
Brody•3mo ago
sounds good
expired_watermelon
expired_watermelonOP•3mo ago
Hi! I re-deployed the env variables a couple of times and it worked, thanks!
Brody
Brody•3mo ago
awsome
Want results from more Discord servers?
Add your server