Larvel API wakes up from nap with a error but when hit again with another request it works

definewater
HOBBY

a year ago

Hey guys im currently using Laravel 10. And i am trying to use the "sleep" feature but when my app is sleeping, and if i do a get request it will take some time to spin up (expected) but then it wil throw a NGINX problem shown on the screenshot below.

any idea?

0 Replies

definewater
HOBBY

a year ago

N/A


a year ago

are you using a health check?


definewater
HOBBY

a year ago

yea


definewater
HOBBY

a year ago

but just on /


a year ago

try implementing a readiness health check


definewater
HOBBY

a year ago

should i just remove


definewater
HOBBY

a year ago

it


definewater
HOBBY

a year ago

imma try that


a year ago

you are doing the exact opposite of what i said, you always want to have a health check, preferably not / though


definewater
HOBBY

a year ago

aight bet


definewater
HOBBY

a year ago

thanks


a year ago

a proper readiness health check is going to be best, not just return 200, check if you are connected to the database and such


definewater
HOBBY

a year ago

bet thank you, i will cook it up now


definewater
HOBBY

a year ago

💯


Larvel API wakes up from nap with a error but when hit again with another request it works - Railway Help Station