Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions admin_manual/configuration_database/bigint_identifiers.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
======================================
Convert to 64-bit database identifiers
======================================
================================================
Prevent identifier exhaustion in large databases
================================================

Nextcloud uses big integers to store identifiers and auto-increment keys in the database.
Because changing columns on huge tables can take quite a while (up to hours or days)
depending on the number of files in the Nextcloud instance, this migration on the filecache
and activity table has to be triggered manually by a console command.
Database identifiers stored as 32-bit integers have a limited range. Larger Nextcloud
installations can exhaust this range in heavily used tables, preventing new records from
being created. Converting these identifiers and their auto-increment keys to 64-bit
integers provides more capacity for future growth.

Changing columns in large tables can take several hours or even days, depending on the
number of files in the Nextcloud instance. For this reason, conversion of the
``filecache`` and activity tables must be triggered manually with a console command.

The command can safely be executed. It will show a success message when there is nothing to do::

Expand All @@ -22,6 +26,5 @@ to suppress the confirmation message append ``--no-interaction`` to the argument

sudo -E -u www-data php occ db:convert-filecache-bigint --no-interaction


.. note:: Similar to a normal update, you should shutdown your Apache or nginx server or enable maintenance
mode before running the command to avoid issues with your sync clients.
Loading