Simon ππ
Explore posts from serversRRailway
β’Created by Simon ππ on 8/13/2024 in #βο½help
Unable to call Streaming Response from FastAPI in production
thanks for the support
33 replies
RRailway
β’Created by Simon ππ on 8/13/2024 in #βο½help
Unable to call Streaming Response from FastAPI in production
I figured it out. When disconnecting from Prisma Query Engine it would just freeze the server. I switched from using Hypercorn to Uvicorn and now it works!
33 replies
RRailway
β’Created by Simon ππ on 8/13/2024 in #βο½help
Unable to call Streaming Response from FastAPI in production
How do I do that?
33 replies
RRailway
β’Created by Simon ππ on 8/13/2024 in #βο½help
Unable to call Streaming Response from FastAPI in production
Ok so I added
Which offers plenty of system info during deploy. Although the debugging log stops displaying once prisma is disconnected. After that nothing (There should be callbacks logged at this point). If I try to make any further requests no debugging is displayed at all.
33 replies
RRailway
β’Created by Simon ππ on 8/13/2024 in #βο½help
Unable to call Streaming Response from FastAPI in production
I was just confused to why it 'errored' with printing to stderr.
The main problem is I am just struggling to work out how to debug this issue because all I get is a FUNCTION_INVOCATION_TIMEOUT when I make calls in production. In Development I get no errors come up and it works fine in development.
What would be the best way to debug this?
33 replies
RRailway
β’Created by Simon ππ on 8/13/2024 in #βο½help
Unable to call Streaming Response from FastAPI in production
alot of it is print(). Should I use 'structlog' or is there a preference on Railway?
33 replies
RRailway
β’Created by Simon ππ on 8/13/2024 in #βο½help
Unable to call Streaming Response from FastAPI in production
I get it that this means that its printing to stderr
33 replies
RRailway
β’Created by Simon ππ on 8/13/2024 in #βο½help
Unable to call Streaming Response from FastAPI in production
How come debugging in Deploy Logs is highlighted red with a level: "error" with really no other information besides this?
33 replies
RRailway
β’Created by Simon ππ on 8/13/2024 in #βο½help
Unable to call Streaming Response from FastAPI in production
okay i'll try it out. thanks!
33 replies
RRailway
β’Created by Simon ππ on 8/13/2024 in #βο½help
Unable to call Streaming Response from FastAPI in production
What is the best way of logging on Railway during API calls?
33 replies
RRailway
β’Created by Simon ππ on 8/13/2024 in #βο½help
Unable to call Streaming Response from FastAPI in production
Okay will do. I have tested several different ways to make API calls but it seems once it hits one error or warning it stalls and I cant call it again... I thought it was a hypercorn thing maybe
33 replies
RRailway
β’Created by Simon ππ on 8/13/2024 in #βο½help
Unable to call Streaming Response from FastAPI in production
the whole route.ts is as follows:
33 replies
RRailway
β’Created by Simon ππ on 8/13/2024 in #βο½help
Unable to call Streaming Response from FastAPI in production
33 replies
RRailway
β’Created by Simon ππ on 8/13/2024 in #βο½help
Unable to call Streaming Response from FastAPI in production
A call from next/api is sent to fastAPI via:
33 replies
RRailway
β’Created by Simon ππ on 8/13/2024 in #βο½help
Unable to call Streaming Response from FastAPI in production
Yes, sorry, I am sending it to a clients browser. They make an API call from the next.js backend to Railway for this 'gen_query'.
33 replies
RRailway
β’Created by Simon ππ on 8/13/2024 in #βο½help
Unable to call Streaming Response from FastAPI in production
Yes its via an API call from a next.js server
33 replies