pauldps
V2 + App Sleep = first response always empty
I recently deployed a new Bun API on V2 with App Sleep, and I've noticed that the first request to a sleeping app always returns an empty response. This hasn't happened on non-V2 Bun apps with App Sleep on.
The following are tests with curl using the same URL/endpoint.
Normal request (non-sleeping app,
{"status": "OK"}
is the response from my API):
First request on the same app but sleeping:
Project ID: 34304961-2ebf-4d0b-b2ae-3585cf6b9353303 replies
Private URL not working (public URL works fine)
I've spun a new database service inside my project to run a libSQL database (https://github.com/tursodatabase/libsql/blob/main/docs/DOCKER.md).
The service itself is running fine and I can connect to it via its public URL from another service (a Bun API) inside the same project.
But using the private URL to connect does not work.
This is what I've done:
- Enabled private networking for both apps
- Added 3s of sleep before the start command. I can see the delays in my logs. From my Dockerfile:
- "migrator" is an executable that runs migrations on my database, and "server" is the API itself. The errors are coming from my migrator command.
- Manually set the PORT env variable in the libSQL service so that I can use it in the private URL from the API
- (just in case) Added
ENABLE_ALPINE_PRIVATE_NETWORKING
as true in my API service. I'm using an external image in my Dockerfile that I'm not sure is Alpine, so this might not be having an effect.
API logs (with private URL and port):
Project ID: 71754a48-09bb-4250-b361-ff5ab1df959721 replies
Crystal app memory usage seems incorrect (and keeps growing)
A few days ago I deployed a Crystal app, it's a web api that uses less than 10MB of memory (running it locally it uses less than 1MB of memory) but Railway reports 40MB usage, and it keeps growing at about a 10MB/day rate every day without use (according to logs). I am not running other processes in the background, it's just an executable that serves an API and connects to a cockroachDB database elsewhere. I'd like to better understand why Railway is reporting 40MB (and the growth) as I think it's unlikely to be caused by the executable I'm running.
6 replies
Crystal+Lucky+Nixpacks failing to build with openssl errors
Hi, I'm trying to deploy a simple Crystal app using the Lucky lib (which uses SSL) and the deploy is failing to build.
I've confirmed that the default Nixpack for Crystal already includes openssl and pkg-config, but the deploy is failing with the following:
My project has a
nixpacks.toml
file that includes the requirements for Lucky (relevant one is libssl-dev
):
I've ran out of options. The project runs fine locally. Any advice?54 replies