memory_limit - server error

memory_limit - server error

by jobe jobe -
Number of replies: 5
Hello. I keep getting the following server error:

Jun 12 03:00:04 server suhosin[3152]: ALERT - script tried to increase memory_limit to 201326592 bytes which is above the allowed value (attacker 'my_ip_number', file '/home/account/public_html
/moodle/lib/setuplib.php', line 80)

I have the memory_limit set to 64mb.
Should i increase it even more? Or is this something else - something that needs configuring in the admin panel?
Thanks.

Average of ratings: -
In reply to jobe jobe

Re: memory_limit - server error

by Ken Wilson -
Hello Jobe

201326592 bytes = 192MB, so try increasing your memory_limit value to that or 256MB (just in case wink).

Ken
In reply to Ken Wilson

Re: memory_limit - server error

by jobe jobe -
Thanks Ken - will try it.

It is the cron job that's triggering the warning in a Moodle site that is not being used at all.

I'm on a VPS with 768mb of ram - do you know if putting up the limit might have other consequences on the server & scripts?

Or instead of changing the php.ini file maybe I should try to change it locally in the .htaccess file?
In reply to jobe jobe

Re: memory_limit - server error

by Ken Wilson -
If your VPS allows you to burst up to higher values than 768MB, then I wouldn't worry too much about it. It's best to change the value in the PHP.INI file as the .htaccess file can have performance impacts.

Good luck!

Ken
In reply to Ken Wilson

Re: memory_limit - server error

by jobe jobe -
Yes, I've got 2gb burst ram.

Thanks for the Apache reference - much appreciated.
In reply to jobe jobe

Re: memory_limit - server error

by John Rodkey -
As it turns out, this is a problem with suhosin hardening of php.
Edit /etc/php5/conf.d/suhosin.ini and change suhosin.memory_limit to the same value assigned to memory_limit in /etc/php5/apache2/php.ini (or /etc/apache2/php.ini, depending on your Linux distribution).

John