503 with no reason
when I'm trying to make POST to my app endpoint, I'm getting 503
I put in body fields to update in DB, like id and amounts
but when code comes to DB interactions, Railway send me 503
cuz Railway doesn't allow my app to log into console, I'm doing it in response body
I've wraped all db calls with try-catch, but I doesn't get any response from them, but 503 from Railway
22 Replies
Project ID:
f041c12e-a344-41f2-8269-546b53665885
f041c12e-a344-41f2-8269-546b53665885
please read this https://docs.railway.app/troubleshoot/fixing-common-errors
no... application is responding
but not in all cases
ah, then make sure you are using https
and I'm already using 0.0.0.0:PORT)
i mean use https when making api calls
oh, yep I do
then your app is sending malformed responses back
or you are sending malformed requests to railway
hm... I'll add some data:
503(Railway response) body:
200(any my responses) bodies:
all invalid body variants are responds normally, cuz of my checks
but if body is valid... it must find user in DB and create or update it's record
but... for some reason when it comes to DB interactions, Railway sending me 503
first of all I was guessing that there throws some error on DB call
but, after I've wrapped all DB calls in try-catch, I'm still getting 503
I can't tell is it again some trouble cuz of docker/linux
but I can't do request on my app, if I'll run it locally in docker, without it all is great
cuz Railway doesn't allow my app to log into consolemaybe if it was possible to do logs, it'll be much easier, but, I can't see any log on website
why arent you using a proper database client to enter data into your database?
that's for payment service webhook
they send a big json, but atleast for now, I'm interested only in that two fields
what do you see when you open your deploy logs?
Nothing
But when deploy removed, I see there all logs that my app was sending from very beginning
are you using a dockerfile?
As I remember from earlier trys, docker is the only option for C++, so yep, I use Dockerfile
what logging library are you using?
I use logs that included in drogon framework
Bu I also tried cout and fpritf with stdout specification
*drogon version from vcpkg
please make sure you are not buffering your logs
railway uses a line based scanner, so if you are buffering logs, the line scanner will not see any lines
Hm... cout and other use streams for printing... So maybe that's the case, I'll look up for alternatives
spdlog works just fine
but... I'm still cant get any error logs
the worse that I can't trigger that on local to debug
if there no errors... may be DB call doesn't sent...
or maybe it self triggering Railway to do 503 response ?
Solution
it was just 0xC0000005