Page 1 of 1
Allowed Memory Size exhausted when trying to convert DB
Posted: Fri Jun 26, 2020 7:41 am
by dlukinski
Hello XI Support
We are getting this error when trying to convert XI DB from Postgres to MySQL:
php pg2mysql_cli.php nagiosxi.psql nagiosxi.mysql myisam
Filesize: 1.3G
PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 230 bytes) in /tmp/pg2mysql-master/pg2mysql.inc.php on line 85
Please advice what to do
Thank you.
Re: Allowed Memory Size exhausted when trying to convert DB
Posted: Fri Jun 26, 2020 4:43 pm
by cdienger
Check the memory allocated in /etc/php.ini and increase it -
https://support.nagios.com/kb/article/n ... e-611.html.
Re: Allowed Memory Size exhausted when trying to convert DB
Posted: Mon Jun 29, 2020 11:22 am
by dlukinski
Hi
I've copied PHP.ini from the old system, but still not luck with DB conversion (same error) / PHP.ini has 4096 MB configured, but shows 512 MB in the error?
Code: Select all
[root@fikc-nagxiprod01 pg2mysql-master]# php pg2mysql_cli.php nagiosxi.psql nagiosxi.mysql myisam
Filesize: 1.3G
PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 230 bytes) in /tmp/pg2mysql-master/pg2mysql.inc.php on line 85
[root@fikc-nagxiprod01 pg2mysql-master]# mc
You have new mail in /var/spool/mail/root
[root@fikc-nagxiprod01 etc]#
Re: Allowed Memory Size exhausted when trying to convert DB
Posted: Tue Jun 30, 2020 9:42 am
by cdienger
Try running it like this:
Code: Select all
php -d memdory_limit=4096M pg2mysql_cli.php nagiosxi.psql nagiosxi.mysql myisam
Re: Allowed Memory Size exhausted when trying to convert DB
Posted: Tue Jun 30, 2020 12:09 pm
by cdienger
Resolved this over a call, but for future searchers, the memory setting is in pg2mysql.inc.php:
Code: Select all
pg2mysql.inc.php:ini_set("memory_limit", "512M");