Repository navigation
Description
OpenRegister upgrade OOMs (512 MB) on NC35 + pgsql — Doctrine full-schema introspection of dynamic object tables
Severity: critical / release-blocking. A default-memory occ upgrade (or occ app:enable openregister) fatals on an instance that has accumulated dynamic object tables, leaving OpenRegister disabled — and taking every AppHost consumer (keepiq's admin surface) down with it.
Symptom
PHP Fatal error: Allowed memory size of 536870912 bytes exhausted
(tried to allocate 20480 bytes)
in /var/www/html/3rdparty/doctrine/dbal/src/Schema/PostgreSQLSchemaManager.php on line 545
occ app:enable openregister → exit 255, app stays disabled, installed version stuck at the old value (here 0.2.17 while the code is 2.1.27).
Root cause
The migration itself (Version1Date20260831120000 — the additive fleet task-store tables) is fine. The OOM is in Nextcloud's migration framework loading the full schema: MigrationService::migrate → $schemaClosure() builds an ISchemaWrapper, which makes Doctrine's PostgreSQLSchemaManager introspect every table in the instance — including OpenRegister's dynamic object tables (oc_openregister_table_*).
Each dynamic table is heavy to introspect: oc_openregister_table_28_130 alone carries ~20 indexes — pkey, uuid, uuid_uq, a GIN relations index, a trigram name index, a partial live_owner index, and six *_facet indexes (catalogus_id, title, default, integration_level, last_sync, published). OpenRegister creates one such physical table per register-schema, so the introspection cost scales linearly with the number of registers/schemas and overruns the 512 MB default.
This is not NC35-specific in principle, but it bites now because (a) the schema has grown and (b) any migration on the instance pays the full-introspection cost.
Impact
- Any
occ upgradeon an instance with enough registers fails at the default memory limit. - Cascades to dependent apps: apps built on the OpenRegister AppHost (e.g. keepiq) hard-depend on OpenRegister being enabled; when it can't enable, their admin surface / manifest UI break. This blocked keepiq's NC35 beta verification.
Confirmed workaround
php -d memory_limit=4G occ app:enable openregister # migration completes, app enables, version reconciles to 2.1.27
(On a dev box with the profiler/xdebug on, a second OOM then fires in FileProfilerStorage saving the migration's query trace — dev-only; run with XDEBUG_MODE=off / profiler disabled.)
Fix directions (OpenRegister)
- Reduce the per-dynamic-table introspection footprint — the index count per object table (GIN + trigram + partial + 6 facet indexes) is the multiplier. Fewer/conditional indexes, or building facet indexes lazily, cuts the cost every migration pays.
- Keep dynamic object tables out of the core migration schema comparison if at all possible (they're app-managed, not migration-managed) — this is the structural fix; introspecting hundreds of app-data tables on every framework migration is the anti-pattern.
- At minimum, document a required
memory_limitfor OpenRegister upgrades and surface a clear error instead of a bare OOM.
Environment
Nextcloud 35.0.0 dev (35.0.0.1), PostgreSQL, PHP 8.4, OpenRegister 2.1.27-unstable.20260915120000 upgrading from 0.2.17-unstable.24. Repro: docker exec -u www-data <nc> php occ app:enable openregister.
Activity
github-actions commentedon Sep 15, 2026
Thank you for opening this issue! It has been assigned to @rubenvdlinde for review.
What happens next:
Triage labels:
triage:accept-feature— accepted as a new featuretriage:accept-bugfix— accepted as a bug fixtriage:needs-info— more information neededtriage:wontfix— will not be addressedtriage:duplicate— duplicate of another issuerjzondervan commentedon Sep 15, 2026
@/tmp/claude-1000/-home-robert-zondervan-Conduction-Repositories-nextcloud-docker-dev-workspace-server-apps-extra/7f71be4a-a498-4a50-a06a-75a2b41c4900/scratchpad/3776-comment-corrected.md
chore(deps): motivate the NC35 max-version from OpenRegister's own NC…