Prisma Error: Error Querying DB due to DB is starting up
So I am building an admin panel that is hosted in railway, since i put my db and app to sleep if it is not used it resulted error in first query since db is starting is longer than app starting. How can I mitigate such error?
![No description](https://cdn.answeroverflow.com/1255358612029702226/image.png)
2 Replies
Do you have any way to know if the db has completed the start process?
I don't think so since It is an outside server, hence the only think I can do to improve ux is to throtle request via promise and loading bar
but there should be a better way to handle this issue other than throtling user request..
however the usecase is small enough since when the database is hot it will not show any sign of this error...