Common errors and their fixes
The error messages people search for, with the fix on Tanzahost first: database hosts, ports, file permissions, memory and upload sizes.
Updated 17 Oct 20262 min read
Each page here starts with an error message as you'd paste it into a search, and gives the fix on Tanzahost first, then why it happens and how to check. These are the errors where the answer on Tanzahost differs from the one you'd find for a cPanel host or your own computer.
| Error | The fix on Tanzahost, in one line |
|---|---|
SQLSTATE[HY000] [2002] Connection refused | Attach the database to your app: its host is a name like mysql.duka.internal, never 127.0.0.1. |
SQLSTATE[HY000] [1045] Access denied for user | Let the attached database fill in its user and password, instead of copying them by hand. |
| could not find driver | Require ext-pdo_mysql or ext-pdo_pgsql in composer.json, or tick it under PHP extensions. |
| No application encryption key has been specified. | Make a key with php artisan key:generate --show and add it as the APP_KEY variable. |
| The new version didn't answer its health address in 120 seconds. | Listen on 0.0.0.0 and the port in PORT (8080), and answer the health address with a success. |
| Error establishing a database connection | Check the site's own database is running, and that wp-config.php reads the site's settings. |
| Allowed memory size of 134217728 bytes exhausted | Raise memory_limit in the app's PHP settings, up to its memory limit. |
| The uploaded file exceeds the upload_max_filesize directive in php.ini | Raise upload_max_filesize and post_max_size in the app's PHP settings, up to 2 GB. |
| laravel.log could not be opened: Permission denied | Keep storage in the app's permanent folders. Never chmod 777. |
| DisallowedHost at / Invalid HTTP_HOST header | Read ALLOWED_HOSTS from a variable, and answer the health check on a path of its own. |
| ModuleNotFoundError: No module named | Add the package to requirements.txt, or the file your tool uses, and push. |
| JavaScript heap out of memory | Give Node.js a bigger heap in the build command, within the build's 2 GB. |
Where to look first
Most errors show up in one of three places:
The deploy's page, when a new version didn't go live. It says why, with the app's last 50 log lines. Your visitors keep the version before.
The build's log, when the code didn't build: every step, then your own commands' output, line by line.
The project's logs, for an app that's live: what its web, workers and scheduled tasks print, and each visit with its status, kept for 7 days.
Can't find your error here? Choose Contact support in the dashboard and pick the project: we attach its apps, failed builds and recent errors ourselves. See support tickets.