R
Railwayā€¢11mo ago
Pontin

Typebot ~ FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory

Hello, this is happening to me And after that, all accesses to the typebot viewer go wrong (it shows a message that the funnel was not found) log: <--- Last few GCs ---> [16:0x7080870] 12732610 ms: Mark-sweep (reduce) 4074.4 (4143.7) -> 4073.4 (4143.9) MB, 4167.2 / 0.0 ms (average mu = 0.129, current mu = 0.001) allocation failure; scavenge might not succeed [16:0x7080870] 12736699 ms: Mark-sweep (reduce) 4074.6 (4143.9) -> 4073.6 (4144.2) MB, 4086.1 / 0.0 ms (average mu = 0.063, current mu = 0.001) allocation failure; scavenge might not succeed <--- JS stacktrace ---> FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory 1: 0xb95b60 node::Abort() [next-router-worker] 2: 0xa9a7f8 [next-router-worker] 3: 0xd6f2f0 v8::Utils::ReportOOMFailure(v8::internal::Isolate, char const, bool) [next-router-worker] 4: 0xd6f697 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate, char const, bool) [next-router-worker] .....
40 Replies
Percy
Percyā€¢11mo ago
Project ID: 1aa116a9-6ebc-47de-b8e8-4801e78f6a66
Pontin
PontinOPā€¢11mo ago
1aa116a9-6ebc-47de-b8e8-4801e78f6a66
Fragly
Fraglyā€¢11mo ago
Can't reach database server at postgres.railway.internal:5432
Could you try adding a 3 second sleep in your start command?
Pontin
PontinOPā€¢11mo ago
This doesn't happen when I 'start'... it happens like this: everything is working normally, and after a few minutes or hours, kaboom. stops working out of nowhere
Fragly
Fraglyā€¢11mo ago
Could you try anyway?
Pontin
PontinOPā€¢11mo ago
here, friend, would that be it? /bin/sh -c "sleep 3; unset PGPORT; docker-entrypoint.sh postgres --port=5432" in 'Custom Start Command' on postgres?
Pontin
PontinOPā€¢11mo ago
_ šŸ”“ (to update the topic, the image I had sent before was not the first in log)
No description
Pontin
PontinOPā€¢11mo ago
obs: my plan is the pro plan - 32 GB RAM / 32 vCPU per Service
Fragly
Fraglyā€¢11mo ago
oh so you get out of memory before getting the database issue šŸ¤” Mind sharing your metrics?
Pontin
PontinOPā€¢11mo ago
No description
No description
No description
No description
Pontin
PontinOPā€¢11mo ago
its here friend
Fragly
Fraglyā€¢11mo ago
those spikes are interesting.. are you sure these are on a pro plan account? My best guess is you get memory spikes that goes above 8gb, in short enough timeframes that it does not get picked up by the metrics and that causes out of heap memory errors
Pontin
PontinOPā€¢11mo ago
I wish that was it, so the solution would be easier, but I'm really on a pro account
No description
Pontin
PontinOPā€¢11mo ago
and i only have 1 typebot is this workspace i dont know why this happening, doenst make sense and the size of my postgres data is 1.42gb... the max is 50gb
Fragly
Fraglyā€¢11mo ago
when you purchase pro plan then you get given another account so you may have both a pro plan and a hobby plan account just make sure this project is on the pro plan account
Pontin
PontinOPā€¢11mo ago
I believe so, but, see:
No description
Pontin
PontinOPā€¢11mo ago
(oafish harmony is my typebot)
Brody
Brodyā€¢11mo ago
was typebot originally deployed to a hobby plan?
Pontin
PontinOPā€¢11mo ago
hello brody! yes, u are right.. I migrated it from the hobby plan to the pro plan
Brody
Brodyā€¢11mo ago
what does the disk usage of the volume for postgres look like side note, did you know you can rename that from the projects settings
Pontin
PontinOPā€¢10mo ago
No description
Pontin
PontinOPā€¢10mo ago
like this, brody sorry for the delay, I was on vacation
Brody
Brodyā€¢10mo ago
that's cpu/mem/net please show me disk usage by clicking on the volume to bring up the volumes metrics and settings
Pontin
PontinOPā€¢10mo ago
oh, sorry
Pontin
PontinOPā€¢10mo ago
No description
Pontin
PontinOPā€¢10mo ago
in 1 hour is
Pontin
PontinOPā€¢10mo ago
No description
Brody
Brodyā€¢10mo ago
you're no where near 50gb, so that's not the issue can you connect to postgres externally?
Pontin
PontinOPā€¢10mo ago
Yes, I activated this to be able to control some users/plans more automatically, I generally leave it activated. However, I have this problem from time to time, I don't know if it's because of that... ā€‹
Brody
Brodyā€¢10mo ago
is typebot offline right now?
Pontin
PontinOPā€¢10mo ago
No, not at the moment
Brody
Brodyā€¢10mo ago
can you redeploy it?
Pontin
PontinOPā€¢10mo ago
Of course, is there a correct order to redeploy? Or i can just redeploying one by one ?
Brody
Brodyā€¢10mo ago
I'd go with the viewer before the builder
Pontin
PontinOPā€¢10mo ago
done, typebot is currently working. Do you want me to do anything else?
Brody
Brodyā€¢10mo ago
umm ask a typebot community why typebot decided to crash
Pontin
PontinOPā€¢10mo ago
okay
Brody
Brodyā€¢10mo ago
not too much I can do about that unfortunately
Pontin
PontinOPā€¢10mo ago
brody, do u know if is there any problem with having 2 typebots in the same workspace? I'm thinking about ''creating'' a new one in the same workspace, to see if it's ok
Brody
Brodyā€¢10mo ago
in the same workspace, nothing wrong with that, in the same project, no, don't do that
Want results from more Discord servers?
Add your server