Simple HTML high memory usage
isnakode
FREEOP

9 months ago

I just deployed my simple HTML app. It's just basic HTML with a fetch request to my Go backend, but the memory usage is too high—almost 50MB—while my Go backend averages just 5MB. Did I do something wrong, or is this normal?

Solved

6 Replies

isnakode
FREEOP

9 months ago

OK, I didn't do anything, and memory usage just dropped to 14 MB. Interesting, but I expected it to go lower—below 10, or even better, near zero.


brody
EMPLOYEE

9 months ago

Hello,

Previously your static files where being served with NGINX when the memory was 50MB, but since switching to Railpack your static files are now being served with Caddy (a program written in Go FWIW) so memory is now lower.

Either way, memory will never drop to zero unless you use serverless, because to serve static files you need to have a server running, and servers will of course use memory.

Hope this helps!

Best,
Brody


Status changed to Awaiting User Response Railway 9 months ago


brody

Hello,Previously your static files where being served with NGINX when the memory was 50MB, but since switching to Railpack your static files are now being served with Caddy (a program written in Go FWIW) so memory is now lower.Either way, memory will never drop to zero unless you use serverless, because to serve static files you need to have a server running, and servers will of course use memory.Hope this helps!Best,Brody

isnakode
FREEOP

9 months ago

Understandable, thanks for the response! I'll use Railpack from now on. Is there a way to make it the default for all new projects?


Status changed to Awaiting Railway Response Railway 9 months ago


brody
EMPLOYEE

9 months ago

It should already be the default for all new projects and services.

But to be double sure, you can place this railway.json file in your repos -

https://github.com/brody192/astro-basic-template/blob/main/railway.json


Status changed to Awaiting User Response Railway 9 months ago


brody

It should already be the default for all new projects and services.But to be double sure, you can place this railway.json file in your repos -https://github.com/brody192/astro-basic-template/blob/main/railway.json

isnakode
FREEOP

9 months ago

Nice, Thanks for help


Status changed to Awaiting Railway Response Railway 9 months ago


brody
EMPLOYEE

9 months ago

No problem!


Status changed to Awaiting User Response Railway 9 months ago


Status changed to Solved brody 9 months ago


Loading...