Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

Troubleshooting database errors

A symptom-first table of the database problems an Exponential site meets on each engine - the site looks down, missing tables, read-only SQLite files, lock timeouts, charset question marks, pgcrypto, sequences, MongoDB…

Download as PDF

Address: https://doc.exponential.earth/learninminutes/exphelp/viewer/help/database-administrators/troubleshooting-database-errors.md

On this page

Troubleshooting database errors

This page is for database administrators called in when an Exponential site has a database problem. It answers: where to look first, and for each common symptom, the cause and the fix. Sources: 12.10 Databases and the gotchas of each engine in chapter 9.

Contents

  1. Where to look first
  2. Every engine
  3. SQLite
  4. MySQL and MariaDB
  5. PostgreSQL
  6. MongoDB
  7. Oracle
  8. Upgrades
  9. When to ask for help

Where to look first

  1. var/log/error.log: most database problems are named there (Log viewer).
  2. The setting in effect: php bin/php/console exp:ini get site.ini/DatabaseSettings/DatabaseImplementation --allow-root-user.
  3. Setup > System information, if the administration still loads.
  4. The database server's own log.
  5. For a detailed view, the debug output for your address only (Finding slow queries).

Every engine

SymptomCauseFix
Every content page fails; error.log says "Database implementation not supported"a mistyped DatabaseImplementation; the kernel falls back to a null databasecorrect the alias, clear the INI cache, restart Velocity
The "database cannot be reached" pagewrong host, user, password or database, or the server is down; the driver raises eZDBNoConnectionExceptiontest the login with the engine's client from the web server
No page loads after switching enginesDatabaseImplementation still names the old engineset it in settings/override/site.ini.append.php, clear the INI cache
A change of settings has no effectINI cache not cleared, Velocity not restarted, or a siteaccess file overrides itexp:ini where, clear, restart
Pages show old data after a manual SQL change or a restorecaches, including the SQL query cachephp bin/php/ezcache.php --clear-all --allow-root-user and exp:velocity cache clear
Works in the browser, fails in cronthe command line PHP lacks the database extensionphp -m (PHP extensions)

SQLite

SymptomCauseFix
"database is busy: the transaction could not start within N s ..."another write held the writer lock for the whole SQLiteTransactionWaitnothing was written; retry; find the long writer (Write queue)
"attempt to write a readonly database"a -shm, -wal or the directory is not writable by this processcommon group, 2775, umask 0002 (Permissions)
The site reports missing tablesa wrong Database value opened a new, empty filecompare the path in the error with ls var/storage/sqlite3/
Slow after an install or importno statisticssqlite3 var/storage/sqlite3/exponential.db ANALYZE
"SQLite3 extension was not found"sqlite3 not loaded in that PHPinstall it
The database file can be downloadedthe web server serves var/shipped rewrite rules or Velocity; check with curl -sI

MySQL and MariaDB

SymptomCauseFix
? where accented letters werethe connection fell back to the server's default charsetAlwaysLog[]=warning, look for "could not set the connection charset" (utf8mb4)
The wizard refuses the database's charsetthe database is latin1 or similarrecreate it in utf8mb4
Emoji are lostthe utf8 (utf8mb3) connectiona known limit of the connection
Transactions do not roll backMyISAM tablesezconvertmysqltabletype.php --newtype=InnoDB
A replica shows old contentreplication lagmonitor lag (Read replicas)

PostgreSQL

SymptomCauseFix
"The 'digest' function is not available in your database ..."pgcrypto missingCREATE EXTENSION IF NOT EXISTS pgcrypto; as owner or superuser
Connection refusedlisten_addresses, pg_hba.confallow the web servers (Setting up PostgreSQL)
Duplicate key on insert after an importsequences behind their tablessetval() (Operating PostgreSQL)
Permission denied to create a table (PostgreSQL 15+)the account does not own the databasemake it the owner
An extension's SQL fails here onlybackticks or MySQL-only statementsReviewing extension SQL

MongoDB

SymptomCauseFix
"Failed to parse MongoDB URI: ... 'default' authentication mechanism requires a username"no User givencreate a user in the site's database (Setting up MongoDB)
Class "MongoDB\Client" not foundthe library mongodb/mongodb is missingcomposer require mongodb/mongodb
Subtree and URL alias queries are slowindexes not createdbin/mongodb/create_indexes.js
A list or page is empty that is not empty elsewhereSQL the adapter cannot translategrep -rn "MONGO TODO" var/log/ (Limits)
The setup wizard times outthe configuration step takes minutesraise request_terminate_timeout or install from the console

Oracle

SymptomCauseFix
The driver is not foundezoracle not active, or oci8 not loadedcheck extension/ezoracle, ActiveExtensions[], php -m
ORA-00933 in an extension's SQLAS before a table aliasfix the extension
An empty string comes back as NULLOracle stores '' as NULLOracleEmptyStringForNull=enabled
A login works only in one casebinary comparisonOracleCaseInsensitive=enabled, then ext:ezoracle:ci-indexes --create
CLOB values cut shortan older ezoracle or a client that cuts long CLOBs above LobPrefetch 2000update the extension
Settings in your site extension are ignoredit is listed after ezoraclelist it before (Oracle tuning)

Upgrades

SymptomCauseFix
SET storage_engine=InnoDB; failsan update file from before October 2026take the current file (SET default_storage_engine)
"duplicate column name" on SQLitethe 6.0.15 file ran a second timethe database is already updated
An update file failed half wayrestore the backup and apply the file again from the start
Every insert fails on PostgreSQL after coming from 5.xold <table>_s sequence namesthe current 6.0 update file renames them
"The audit index classes are not in the autoload array"autoloads stalephp bin/php/ezpgenerateautoloads.php -k

When to ask for help

Collect the error lines, the engine and version, and the report from Setup > System information (it never contains passwords), then use the channels in When something goes wrong. Report security problems privately, never in a public issue.

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x