Skip to content

[NC2移行] メモリ使用量オーバー対応#2122

Merged
akagane99 merged 2 commits into
masterfrom
nc2-migration
Feb 17, 2025
Merged

[NC2移行] メモリ使用量オーバー対応#2122
akagane99 merged 2 commits into
masterfrom
nc2-migration

Conversation

@akagane99

@akagane99 akagane99 commented Feb 14, 2025

Copy link
Copy Markdown
Contributor

概要

大量のuploadsがあるNC2移行を実行時に、memory_limit=1Gを指定してもメモリ使用量オーバーエラーになるため、対応しました。

エラー

エクスポートコマンド(1Gメモリ指定)

# php -d memory_limit=1G artisan command:ExportNc2 all redo
page_id,block_id,category,message
,,Start exportNc2.,
,,Start this->nc2ExportBasic.,
,,Start this->nc2ExportUploads.,
PHP Fatal error:  Allowed memory size of 1073741824 bytes exhausted (tried to allocate 20480 bytes) in /srv/public_html/example.com/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php on line 262
PHP Fatal error:  Allowed memory size of 1073741824 bytes exhausted (tried to allocate 65536 bytes) in /srv/public_html/example.com/vendor/composer/ClassLoader.php on line 576

インポートコマンド(1Gメモリ指定)

# php -d memory_limit=1G artisan command:ImportSite all redo
page_id,block_id,category,message
,,importSite() Start.,
,,Basic import Start.,
,,uploads import Start.,
PHP Fatal error:  Allowed memory size of 1073741824 bytes exhausted (tried to allocate 20480 bytes) in /srv/public_html/example.com/app/Traits/Migration/MigrationTrait.php on line 1445
PHP Fatal error:  Allowed memory size of 1073741824 bytes exhausted (tried to allocate 65536 bytes) in /srv/public_html/example.com/vendor/composer/ClassLoader.php on line 576

レビュー完了希望日

なし

関連Pull requests/Issues

なし

参考

なし

DB変更の有無

なし

チェックリスト

@akagane99 akagane99 added the developer update 開発者向けの更新 label Feb 14, 2025
@akagane99 akagane99 self-assigned this Feb 14, 2025
@akagane99
akagane99 marked this pull request as ready for review February 14, 2025 08:03
@akagane99
akagane99 merged commit fb907be into master Feb 17, 2025
@akagane99
akagane99 deleted the nc2-migration branch February 17, 2025 06:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

developer update 開発者向けの更新

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant