Your plan is a pool of memory and storage. You split it between your apps and databases by giving each one a size, so you can give one app most of the memory or share it evenly.
Sizes
Every app and database has a size: the most memory it may use. Processing power comes with the size, so you only make one choice.
| Size | CPU | Suits |
|---|---|---|
| 256 MB | Half a CPU | Static sites and small APIs |
| 512 MB | Half a CPU | Most Node, Python and PHP apps |
| 1 GB | Half a CPU | Busier apps and background workers |
| 2 GB | 1 CPU | Apps that run several processes |
| 4 GB | 2 CPUs | Heavy apps and in-memory caches |
| 8 GB | 4 CPUs | Data processing, large Java or .NET apps |
New apps and new PostgreSQL databases start at 512 MB. A new Redis database starts at 256 MB. CPU does not count against your plan; only memory and storage do.
How sizes count against your plan
Every running app and database counts its size against your plan's memory. A stopped app uses none: stopping it frees its size, and starting it again needs that much free. Making an app smaller or deleting it frees memory too.
If a size doesn't fit, the change is refused with how much memory is free, for example "You have 512 MB of memory free. Stop an app or make one smaller, or upgrade your plan." When nothing is free, it says "Your plan's memory is all in use by running apps and databases. Stop an app or make one smaller, or upgrade your plan." An organisation that is already over its plan keeps running and can still stop or shrink things, but can't add, grow or start anything until it fits.
A running app's new size also has to fit on the server it runs on. If it doesn't, the size doesn't change and you're told so; try a smaller size or try again later.
The Plan and usage page shows how much memory and storage your organisation uses against the plan, and Memory per app and database lists the size of each one. Usage and limits explains how each is measured.
Plans
| Plan | Projects | Databases | Memory | Storage |
|---|---|---|---|---|
| Solo | 3 | 1 | 1 GB | 10 GB |
| Developer | 6 | 3 | 4 GB | 20 GB |
| Pro | 12 | 8 | 8 GB | 40 GB |
| Team | 24 | 20 | 16 GB | 80 GB |
Databases have their own limit, separate from projects. Your own plan's figures are on the Plan and usage page. A plan that fills every slot at 512 MB can need some apps or databases at 256 MB: Developer's 9 slots at 512 MB come to 4.5 GB, more than its 4 GB.
Change the size of an app
- Open the project and go to Settings.
- Under Resources, the bar shows your plan's memory: this app, your other apps and databases, and what is free. Pick a size. A size that doesn't fit your plan's free memory is greyed out and says how much memory to free up first: make your other apps or databases smaller, or upgrade your plan.
- Click Change size and restart, or Change size if the app is stopped.
Changing the size restarts the app if it is running, so the new size applies straight away. A stopped app takes the new size when it next starts.
Change the size of a database
- Open the project and go to Databases.
- Open Resources on the database.
- Pick a memory size and click Change memory size, or enter more storage and click Grow storage.
Changing the memory restarts the database, so it can't take connections for a short time. The memory can only change while the database is running, and not while a backup, restore or import is running on it.
Storage can grow but not shrink. Growing it needs no restart. A new database has 5 GB of storage, and its data and backup files count toward your plan's storage.
Through the API
updateProject with size changes an app's size, and resizeDatabase changes a database's memory and storage. getProject and getDatabase report the current size. See resizeDatabase in the API reference.