R
Railway9mo ago
Pepijn

Pg_dump memory spike

We run a backup each night for a Postgress DB with the default railway postgres backup template. In the image you can clearly see the time it starts when the memory usage spikes. The spike is fine, although I am wondering why the usage remains so high for so long, since the backup only takes 5 mins, but it takes almost 12 hours to return the usage to 'normal'.
No description
Solution:
honestly I have no clue, I have experienced this before as well, my solution was to run the backup in a sort of a single shot mode, meaning when the code starts it takes a backup and exits, that way you can use railways scheduler, you will still pay for that spike of memory, but you won't pay for any memory after that spike because the entire container will exit
Jump to solution
3 Replies
Percy
Percy9mo ago
Project ID: a0f3572b-295e-4a43-b776-ce352a4d0980
Pepijn
PepijnOP9mo ago
a0f3572b-295e-4a43-b776-ce352a4d0980 Service ID: 54e153e1-ea03-4c98-b467-51462df56889
Solution
Brody
Brody9mo ago
honestly I have no clue, I have experienced this before as well, my solution was to run the backup in a sort of a single shot mode, meaning when the code starts it takes a backup and exits, that way you can use railways scheduler, you will still pay for that spike of memory, but you won't pay for any memory after that spike because the entire container will exit
Want results from more Discord servers?
Add your server