Memory_limit in php setting

Memory_limit in php setting

Lei Zhang -
回帖数:7
I noticed an requirement when I go through the installation for moodle1.91**, it says memory_limit setting needs to be set at 40M for moodle 1.8 or later, large site needs more than 128M. Just wonder does it really matter?? I'm currently got a moodle1.9 site running with memory_limit set at 16M, which is way below the recommendation. It works fine.

can anyone explain to me how does memory_limit affect to moodle running?

also I found this on php.net
http://bugs.php.net/bug.php?id=36568
it suggests memory_limit have no effect on windows box, this really confuse me now.

**memory_limit
should be at least 16M (32M is recommended for Moodle 1.7 and 40M for Moodle 1.8 or later). Large sites may need more than 128M. PHP 5.2.x requires higher memory_limit values than previous versions of PHP. 64bit operating systems require even more memory.
回复Lei Zhang

Re: Memory_limit in php setting

linda linda -

In my experience, the only matter in which memory_limit can affect moodle execution is in loading content. The file upload is indeed affected by three php.ini parameters: memory_limit, post_max_size and upload_max_filesize, as stated also in the php.net site documentation.

回复Lei Zhang

Re: Memory_limit in php setting

Howard Miller -
Core developers的头像 Documentation writers的头像 Particularly helpful Moodlers的头像 Peer reviewers的头像 Plugin developers的头像
Backup and restore eats memory for one thing.

It doesn't matter if it doesn't affect you, but if you have it set low don't be surprised if you get a call about blank pages at some point.
回复Howard Miller

Re: Memory_limit in php setting

Geoff Waring -

What functions cause the blank pages for users?

I just moved to Moodle 2.0, which requires a 128Mb memory_limit (up from 40Mb for Moodle 1.9). However most shared hosting providers do not allow this large a memory_limit. Mine temporarily let me raise it to 128Mb for the upgrade, but moved me back to 64Mb afterwards. After experimenting I have only found course backup and restore need 128Mb. If I don't do course backups, can I get by with 64Mb memory_limit without blank pages for users? I only have 20 users enrolled. Or is there some other memory intensive function I have missed?