Skip to content
Skip the docs menu

Servers

Recommended settings and limits

Size the web server, PHP, databases and Redis for your server's memory, set each site's limits, and fix the classic web errors.

Last updated 10 min readView as Markdown

On this page

Fuzops looks at what your server has (memory, processors, disk) and what runs on it (PHP sites, databases, Redis, apps), and recommends a value for every setting that matters in production, with one sentence saying why. You never have to edit a settings file by hand. A PHP pool file you edit or paste on a site's PHP settings page is left alone by the recommendations until you choose Go back to the file Fuzops writes there.

Where to find it#

  • Recommended settings (technical name: tuning) is in the server's Services tab.
  • Limits and easy fixes is in each site's Settings tab. It is also in the site's quick actions as Fix a common error.

How the memory is shared#

The top of the page shows how the server's memory is split between what is installed, so a recommendation never reads as magic. For example: 11.6 GB: databases 3.1 GB, PHP 1.7 GB for 35 workers, Redis 512 MB, apps 4.2 GB, system and cache 2.2 GB.

How the memory is shared: databases, PHP workers, Redis, apps, and the system with its file cacheHow the memory is shared: databases, PHP workers, Redis, apps, and the system with its file cache
Every part gets its share; what is left keeps reads fast.
  • Something is always kept for the system and its file cache.
  • PHP workers are counted from what one worker really uses on your server, so all of them together fit in PHP's share. Fuzops never promises more workers than the memory holds.
  • On a server made only for databases, the databases get most of the memory.
  • The sizes follow the memory the server can really use. A server that runs with a memory limit (for example a container on a larger machine) is sized for its limit, not for the machine's memory, and the page says so.
  • For MySQL, MariaDB and PostgreSQL, each setting shows the database's own default beside the value in use and the recommended one, and needs a restart where applying it restarts the database. A database still on its own defaults for its memory is marked Not optimized yet.
  • When a server is too small for everything installed on it, the page says so instead of promising memory it does not have.

What keeps its own memory#

Some programs keep their own memory, whatever PHP and the databases do: ready-made apps (the memory limit of their containers, with their database), team tools such as GitLab (about 3 GB), Gitea, the search engine or an email server, each Odoo site (about 300 MB per worker, or 512 MB when it runs as one process), and Docker containers that have a memory limit. They come off first, with the system's own share, and PHP, the databases and Redis are sized for what is left. The page lists them in one line, for example 3 GB usable: 1 GB for n8n, 369 MB for the system, 1.6 GB left for PHP, the databases and the cache.

  • When one is added or removed, the recommendations are sized again, and the page and Home say so once.
  • Installing an app, a tool or an Odoo site checks its memory against what is left. When it does not fit, nothing is installed and the message says why and what would make room (remove an app or a tool you no longer use, or a server with more memory). When it fits only by giving PHP and the databases less than they need to stay quick, it is installed and the message says so. Odoo's share is an estimate from its number of workers, not a limit: when only that estimate is in the way, the install goes ahead and the message, the page and Home point to Odoo's own speed settings to lower its workers.
  • When the settings in use on the server count on more memory than it has (for example sized before an app was added), Home says Its settings promise more memory than it has, with a link here: apply the recommendations to size them for what is really left.
  • When even the smallest size of every part does not fit (Odoo is counted at its own planning figure per worker), the page and Home say what would: by how much it is short, then each way that fits on its own, such as removing one app or Odoo copy, lowering Odoo to a given number of workers, or the size of server that holds everything. Home shows it once; you can hide it there.
  • The server's page shows Memory promised under The machine: how much of its memory is already promised to the system and to what keeps its own memory.
  • Swap is shown but never counted as memory: a server that has to use it is already short of memory.

Each service, setting by setting#

The page first shows Settings to look at: only the settings that differ from what is recommended, or that wait for a restart, from every service together. Everything that already matches is behind one button, Show the settings that match, by service, which opens one panel per service: the web server, each PHP version and its workers, MariaDB or MySQL, PostgreSQL, Redis, each app that Fuzops keeps running, and the machine itself (spare memory on disk for small servers, a few system limits, old logs cleaned up).

Settings to look at: only the settings that differ from what is recommended, each with its plain name, its technical name and its stateSettings to look at: only the settings that differ from what is recommended, each with its plain name, its technical name and its state
Plain name first, technical name beside it.

Each row shows the setting in plain words with its technical name beside it, the value now, the recommended value, why, and its state:

State What it means
Matches (a green mark, no word) The server already uses the recommended value.
Differs Apply it to use the recommended value.
You chose your own You set it yourself in the service's own settings (Services › Settings). Fuzops leaves it alone.
Kept yours You chose Keep mine: it is not recommended again until you choose Recommend it again.

Databases#

MariaDB, MySQL and PostgreSQL get settings sized for the memory they are given, the processors and the disk, written to Fuzops' own settings file next to the database's own. Your own database settings (Services › Settings) always win, and who may connect to a database is never changed here.

Each database panel starts with How the database is doing: the most connections used at once against the number allowed, how many reads came from memory, how many temporary tables or sorts went to disk, and the slow queries recorded. Reasons such as "raise the memory for temporary tables" cite these numbers.

Group What it does for you
Memory Most of the database's share keeps often-read data in memory. Memory each connection may use is kept modest, and the page shows the worst case (all connections busy at once) fitting in the share.
Connections Enough for every PHP worker and app that can connect, with room for backups. Idle connections are closed after 10 minutes; apps reconnect by themselves. For PostgreSQL with many connections, a pooler is suggested as information only.
Writes and the disk Background writing suited to the disk. When the server does not say what its disk is, an SSD is assumed, as on almost every cloud server. Each saved change is written to disk at once (safe).
Tables and files Enough open tables and files for busy sites, within the database's own limit.
Text New databases use utf8mb4, which covers every language. Existing databases are never converted.
Logs Slow queries are recorded so a slow page can be traced to its query.
PostgreSQL extras Change-log size and checkpoints, planner costs for SSDs, parallel helpers from the processors, automatic cleanup (always on, a little faster with more processors), and logs of lock waits and large sorts.

PostgreSQL in plain sight. Each PostgreSQL row shows the value in effect, PostgreSQL's own default and the recommendation, and says needs a restart when a change only takes effect after one. A server whose PostgreSQL still runs its out-of-the-box memory settings shows Not optimized yet at the top of the page with Optimize it now, which applies the recommended PostgreSQL settings through the same review. On an Odoo server this page is called PostgreSQL settings and sits in its PostgreSQL tab.

The faster option. "Save every change to disk at once" can be switched to a faster mode that may lose up to a second of writes if the server crashes. It is offered on the row as Use the faster option, and Apply everything never chooses it.

Two databases on one server. When MariaDB or MySQL and PostgreSQL run on the same server, their memory is split by the data each holds and the connections each serves, and the page says how.

What needs a short restart. Most database settings change at once, without a break. A few only take effect when the database restarts, such as PostgreSQL's memory for data and its number of connections. Fuzops asks first and does all of them in one restart per database (a few seconds; about 2.5 seconds on our test server). You can also only write them, and the row then says Written, takes effect at the next restart. Put back the previous settings restores the files and the values that were changed at once, and restarts the database again if the change had restarted it.

Applying#

  • Apply on a row, Apply all on a service, or Apply everything at the top.
  • What will change shows the exact lines each file gets before anything happens.
  • Every service checks its new settings with its own test first. The web server and PHP reload without cutting visitors off. Every site on the server is asked for its home page before and after: if anything fails, the previous settings are put back by themselves.
  • MySQL and MariaDB are never recommended less than 128 MB of memory for data, even on a full server: below that, every page is read from disk. On a server with too much installed, the page then says what would fit instead.
  • Some servers do not allow spare memory on disk (a swap file), often container-type servers. That one setting is then skipped, the others are still applied, and it is not recommended again on that server.
  • A few database settings restart the database, which is a break of a few seconds for its sites. Fuzops asks first, groups them into one restart per database and leaves them out until you say yes.
  • Every change appears in Recent changes and in the activity log. Put back the previous settings undoes it.

New servers and resized servers#

A server set up by Fuzops gets the recommended values as soon as it is ready, and so does a service or PHP version you install on it later. A server that was set up before is never changed without you pressing Apply.

When a server gets more or less memory or processors, its recommendations change. The server's page and Home say so once, one line per server.

A site's limits#

Limits: Longest request, Largest upload, Memory per request and large headersLimits: Longest request, Largest upload, Memory per request and large headers
One choice sets the web server, PHP and the app together.
Limit What it sets
Longest request (1 minute, 5 minutes, 30 minutes, 1 hour, or your own) How long the web server waits for the page (a little longer than PHP), PHP's time limit and the hard stop of its workers. Fixes 504 Gateway Timeout.
Largest upload The web server's upload limit and PHP's largest file and largest form, with room for the form's other fields. Fixes 413 Request Entity Too Large.
Memory per request The most memory one page may use (PHP sites). Fixes "Allowed memory size exhausted".
My app sends large headers or cookies More room for the headers an app sends back. Fixes 502 Bad Gateway with "upstream sent too big header".

The page warns in plain words when a choice is risky for the server: a one-hour request keeps a worker busy all that time, and a 2 GB upload needs free disk space while it arrives.

PHP's values are shared by every site on the same PHP version, so they only go up from a site's Limits, never down. A site that runs on several servers gets its limits on every one of them in one go.

Livewire and other packages that serve their own scripts#

Laravel packages such as Livewire, Filament, Flux and Pulse serve some scripts and uploads through the app (for example /livewire/livewire.js). On Laravel, Symfony and PHP sites, an image, style or script that is not a file on disk goes to the app instead of answering 404, while real files keep their 30-day browser cache. This site uses Livewire is on by default and says "Already handled". Livewire uploads follow Largest upload; Livewire's own rule allows 12 MB per file unless your app raises it in its own configuration.

Fix a common error#

Fix a common error: each error with what it means, what the logs show and the one-click fixFix a common error: each error with what it means, what the logs show and the one-click fix
Errors seen in today's logs are marked.

Each classic error has a card with what it means, what this site's logs show, and the fix:

Error The fix
504 Gateway Timeout Longest request: 5 minutes, 30 minutes or 1 hour. The logs name the page that timed out.
413 Request Entity Too Large Largest upload.
502 Bad Gateway: too large headers My app sends large headers or cookies.
502 Bad Gateway: every PHP worker busy Recommended settings shows how many workers fit in the memory.
502 Bad Gateway: PHP or the app not answering Restart PHP, or start the app and read its log.
500: Allowed memory size exhausted Memory per request.
Too many connections, too many open files, too many visitors at once, OPcache full, out of memory The matching recommended settings.
No space left on device Free up disk space.

The same Fix this button appears next to these errors in Logs (What went wrong), on a failed update, and once in the site's Needs attention.

Still stuck? Get help

Docs menu