Hi gang!
I know this is not an entirely new topic, but most of the issues are from 2024 and there has never been a real answer if not “just increase memory”.
I recently restored my unused Fly account to test the platform and deployed a small Phoenix + Liveview application, with a small ephemeral sqlite db on its side.
I’m basically the only user and deploying on a shared-1x-cpu@256MB that I thought could be enough for the exploration job. The app running in development mode takes usually around 70MB of memory.
Strangely enough, in production the total usage for the whole machine is around 170MB (live dashboard reporting ~80Mb for the application).
Tried to keep watching both htop and the BEAM processes usage but never seen something increasing. The only remaining guilty is an eventual spike, which is honestly unlikely when an OOM happens even only on the landing page (which opens the liveview websocket and in the background slightly increases phoenix’s pubsub memory usage to ~4MB with no other side effect that I can count).
I tried to add some swap (256MB) but funnily enough I don’t see a large or increased usage before the crashes.
Did anyone found the culprit of those seemingly random OOM? While increasing memory is of course an option that I will try if out of ideas, my engineering mind doesn’t like “throw money at the problem” approaches before understanding what the problem is ![]()
Thanks!