3
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

PHPのバッチでmemory_limitの上限を無くす方法

Posted at

よくある設定として

  1. 実行するプログラムの中に書く
hoge.php
ini_set('memory_limit', '256M');
  1. 実行時に指定
php -d memory_limit=512M hoge.php

がよく見かけるけどlimit無制限で実行する方法は

php -d memory_limit=-1hoge.php

マイナス値を入れる

ソースは下記
http://www.php.net/manual/en/ini.core.php#ini.memory-limit

Note that to have no memory limit, set this directive to -1.

localとかの開発環境や占有できる環境でしか使わなそうだけど、とりあえず重いバッチ(PHP)を動かしたい場合はつかえるかな

3
9
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?