Skip to content

Running full LEMP stack on 128MB RAM, here's what broke

VPS Hosting by Bruno22 79 replies 10K views
#1

Ok so I make a test I have this old vps from Contabo with only 128MB and I think lets see if is possible to run nginx mariadb php-fpm and wordpress all together 😂 the answer is NO but the journey is very good so I start with nginx alone and is fine then I add php-fpm and is still fine but slow then I try mariadb and everything explode I learn about swap tuning and oom killer and now I share here for everyone who want to try the same crazy thing

ping so high I wave back
#2

Hey folks, just a quick note that crash reports are welcome here but please keep safety in mind, if you are testing on a production node with customer data that is not something we can encourage 🙂 the educational angle is solid though, carry on

#3
  • nginx 1.24.0 with default worker_processes auto will spawn 4 workers on most KVM nodes, consuming ~20MB resident before any traffic — see https://nginx.org for worker tuning docs.
  • MariaDB 10.11 with innodb_buffer_pool_size default 128MB attempts allocation that exceeds total RAM.
  • PHP-FPM 8.2 with pm.max_children default 5 creates pool overhead of ~15MB per child under opcache.
  • My recommendation: realistic minimum for LEMP with any database workload is 512MB RAM, 256MB only if MariaDB is replaced with SQLite and nginx worker count is manually constrained to 1.
It's always DNS. Always.
#4

This is exactly why I moved my tiny personal blog to a 512MB BuyVM slice. Same price tier as Contabo's entry level but the OOM kills stopped.

#5

FlowSana said:
My recommendation: realistic minimum for LEMP with any database workload is 512MB RAM
Yes I see this now but is fun to push the limit no? I learn more from broke than from work

ping so high I wave back
#6

Five clouds and I still keep one 256MB Oracle free tier for a static Hugo site. No database, no tears.

#7

I run nginx + php-fpm + SQLite on 128MB at Hetzner Nuremberg for a small club site. Works fine because no MariaDB. FlowSana's SQLite point is the key.

#8

Contabo 128MB is 3.99 EUR yes? For 4.20 EUR you get 2GB RAM at Webh. I know because I check every week. Tanie serwery exist but sometimes cheap is too cheap.

#9

stevenquid75 said:
BuyVM slice
BuyVM is a solid choice for low-memory workloads. Their control panel lets you set swap explicitly which helps on the 512MB plans. Still wouldn't run MariaDB on less than 512MB though.

It's always DNS. Always.
#10

In Japan we have ConoHa VPS starting around 600 yen for 512MB. The 128MB experiment is interesting academically but for production please use proper spec.

Post a reply

You need an account to reply. Log in or register to join the conversation.

Post reply Preview Save draft