craftcms / craftcms/ckeditor

Converting Matrix fields memory limit

Open
#360 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
PHP
Stars
47
Forks
32
PR merge metrics
No merged PRs in 30d

Description

Hello there,

I'm trying to convert all matrix fields but the issue is that my Craft installation contains more than 30k entries and I get PHP Fatal Error 'yii\base\ErrorException' with message 'Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes)'

Is it possible to split this migration into parts because I cannot figure any other option how to make it happen?

Additional info
  • Craft version: Craft CMS 5.6.3
  • PHP version: 8.2.26
  • Database driver & version: MySQL 8.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file, test, or entry point is named. Start by reproducing the Matrix-field conversion with Craft CMS 5.6.3, PHP 8.2.26, MySQL 8.0, and more than 30k entries, then trace the migration that performs the conversion. Done means the conversion can run in bounded parts without exhausting the configured memory.

Written by the indexing model from the issue text.

Assessment

Tech stack
mysql, php
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.