MySQL/PHP issue.
-
@coliver said in MySQL/PHP issue.:
@WLS-ITGuy said in MySQL/PHP issue.:
memory_limit = 2147483648
Uh? We're running a fairly large instance of Moodle and limit it to ~400M.
@scottalanmiller said in MySQL/PHP issue.:
@coliver said in MySQL/PHP issue.:
@WLS-ITGuy said in MySQL/PHP issue.:
memory_limit = 2147483648
Uh? We're running a fairly large instance of Moodle and limit it to ~400M.
Have to be careful going too big or it limits the number of processes that can run and slows things way down.
Changed to 400M and I still have the same issue.
-
@WLS-ITGuy said in MySQL/PHP issue.:
@Tim_G said in MySQL/PHP issue.:
You can increase it in the .htaccess file for quick testing (if your config supports it).
I don't see an .htaccess file. Site is hosted at Linode
It's a file you create
-
That part I know, what I meant was that there wasn't one created already if that's what Tim was asking/suggesting.
-
@WLS-ITGuy said in MySQL/PHP issue.:
That part I know, what I meant was that there wasn't one created already if that's what Tim was asking/suggesting.
I thought that he was suggesting that you could create one for fast memory size testing.
-
Increase it temporarily to 2048M, or higher, and drop down once the conversion is done. Restart apache/nginx/other web server, or restart php-fpm if it's used instead after each config change.
-
@marcinozga said in MySQL/PHP issue.:
Increase it temporarily to 2048M, or higher, and drop down once the conversion is done. Restart apache/nginx/other web server, or restart php-fpm if it's used instead after each config change.
Has been set at 2048M, restarted apache and rebooted server and still get the same error.
-
@WLS-ITGuy said in MySQL/PHP issue.:
@marcinozga said in MySQL/PHP issue.:
Increase it temporarily to 2048M, or higher, and drop down once the conversion is done. Restart apache/nginx/other web server, or restart php-fpm if it's used instead after each config change.
Has been set at 2048M, restarted apache and rebooted server and still get the same error.
Is this a script that you run from the command line? You may need to edit a different php.ini file (that used to be the case -- I haven't had to do it in a while) to adjust the memory settings for the php cli.
-
Actually, you might have more than one php.ini file. Create info.php file with this content:
<?php phpinfo(); ?>
and visit it in web browser. See what memory limits it shows and where could additional configs be located.
-
@marcinozga said in MySQL/PHP issue.:
Actually, you might have more than one php.ini file. Create info.php file with this content:
<?php phpinfo(); ?>
and visit it in web browser. See what memory limits it shows and where could additional configs be located.
-
So limit is set to 2G, is the conversion script still refusing to run?
-
Yes. If I CD to /var/www/moodle/ and run 'php admin/cli/mysql_compressed_rows.php --list' I get PHP Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 49152 bytes) in var/www/moodle/admin/cli/mysql_compressed_rows.php on line 152
-
Just to be sure.... you aren't out of memory, right?
-
Oh, that's a cli script, I thought you were calling it with browser. Try this:
php -d memory_limit=2048M admin/cli/mysql_compressed_rows.php --list
-
@marcinozga said in MySQL/PHP issue.:
php -d memory_limit=2048M admin/cli/mysql_compressed_rows.php --list
That all worked! And now I am on to the next part of the upgrade!
-
Just to clarify, -d option allows you to override any php settings.
-
@marcinozga said in MySQL/PHP issue.:
Just to clarify, -d option allows you to override any php settings.
OK. So why would php.ini show that it is allowing 2G but not actually allow 2G?
-
php-cli has its config file elsewhere, I'm not sure where. When you check it through web, it's shows what's in php.ini.
-
@marcinozga
Gotcha! Thanks for the help! -
Run
php --ini
and see what it returns.
-
@marcinozga Gives me a list of files pulled from /etc/php5/cli/