Hi there, this error is frequent when I make reque...
# sst
j
Hi there, this error is frequent when I make requests, for some reason it stops working and the time out error appears in the lambda, is there any parameter that I should add or any configuration so that this error does not occur?
t
Is this endpoint expected to be slow?
j
usually lasts 5s or less
it's not with that one, it's with anyone that sometimes happens.
t
This happens when your function takes too long to run, can you investigate why that part is slow?
j
the problem is, that it does not get to enter the function itself, I do not know if it is because I have by default IAM auth? my internet connection?
f
@Joel Corona when it happens again, can you DM me or @thdxr ur
.build/sst-debug.log
?
Hey @Joel Corona I had a chance to look at the debug log you shared. Here’s what’s going behind the scene:
Copy code
line 668 [2021-09-23T11:09:27.901] // request received
line 680 [2021-09-23T11:09:27.979] // sst start spawns a node process to run the handler code
line 681 [2021-09-23T11:09:35.777] // node process is spawned
line 684 [2021-09-23T11:09:37.576] // Lambda request timedout after 10s and the process is killed
It’s REALLY weird that the node process took ~8s to spawn.
It normally takes a few 100ms to spawn the node process for most ppl I talked to. The longest I’ve seen is ~1s.
You mentioned the timeout issue happens sometimes. • Do you know if it always happen to the same functions? (ie.
POST /user/login
hander) • Can you send me another log when it works? (Ideally a successful request to the same fucntion
POST /user/login
) • What’s ur machine’s os, cpu, mem configuration?
Sorry about the issue. I’m sure we can figure out the root cause!
t
I think maybe he could try the beta of the new runtime server
f
Yeah, that will definitely help. The first request can still timeout, I’m curious why launching a new process took 8s.
j
Hi there, yup, in any other endpoint it sometimes happens to me, I already send a dm with a log @Frank