Historical default max_connections limits across first-generation Amazon RDS MySQL instance classes:
RDS Instance Class
Default max_connections
db.t1.micro
34
db.m1.small
125
db.m1.medium
296
db.m1.large
623
db.m1.xlarge
1,263
db.m2.xlarge
1,441
db.m2.2xlarge
2,900
db.m2.4xlarge
5,816
In RDS Parameter Groups, the dynamic formula defaults to {DBInstanceClassMemory/12582880} for MySQL and LEAST({DBInstanceClassMemory/9531392}, 5000) for PostgreSQL. On modern instance families (such as db.t3 and Graviton db.t4g), pooling connections with Amazon RDS Proxy prevents connection exhaustion from serverless or autoscaling workloads.
Choosing the right AWS region alongside Reserved capacity, Savings Plans, Spot Instances for fault-tolerant jobs, and ARM64 AWS Graviton instance families can cut monthly compute bills significantly without sacrificing reliability.
Alongside swap, keeping a tiny VM responsive came down to caching and restraint: placing Varnish in front of Apache absorbed static/anonymous reads before spawning memory-heavy worker processes, while PHP bytecode caching (APC back then, replaced natively by PHP OPcache today) avoided recompiling scripts on every request.
Cloud & Modern Linux Caveats: Heavy swapping on network-attached EBS volumes adds latency and burns through storage IOPS burst credits, so keep vm.swappiness=10 and treat swap strictly as an OOM safety net. On modern Linux kernels, compressed in-memory swap with zram is much faster and avoids unnecessary disk writes, while older tools like prelink are deprecated because of ASLR.