Web Hosting Forum | Lunarpages

Author Topic: Magento 2 Install Issues  (Read 4114 times)

Offline johannsf

  • Newbie
  • *
  • Posts: 5
Magento 2 Install Issues
« on: July 17, 2016, 06:45:17 AM »
I've installed Magento 2 using Softalucous.  There were some bumps - memory needs to be upped in php.  I still have not been able to index my site - the cron job script delivers a Fatal Error - out of memory message.  Has anyone been successful and been able to index?

Offline MichaelT

  • Support
  • Jabba the Hutt
  • *****
  • Posts: 579
Re: Magento 2 Install Issues
« Reply #1 on: July 17, 2016, 10:26:26 PM »
You should be able to increase the memory limits through the use of a custom php.ini and your .htaccess file.

Basically, you would add the following lines to a blank php.ini file located in your public_html directory (if there is not one there you can create one using a basic text editor):

========================
max_execution_time = 60
memory_limit = 128M
========================

That should increase your memory limit to 128MB, and your max exec time to 1 minute. You can change the 60 and 128M settings as needed it to better suit your needs.

Next, add the following line to your .htaccess file (replace USERNAME with your actual hosting account username):

========================
<IfModule mod_suphp.c>
suPHP_ConfigPath /home/USERNAME/public_html
</IfModule>
========================

This will cause the php.ini file to affect all subfolders, unless a php.ini file is in a subfolder, at which point the php.ini in the subfolder takes precedence.

The following links may also be useful;

RE: http://wiki.lunarpages.com/Create_php.ini
RE: http://wiki.lunarpages.com/Php.ini_settings

Offline johannsf

  • Newbie
  • *
  • Posts: 5
Re: Magento 2 Install Issues
« Reply #2 on: July 18, 2016, 07:17:35 AM »
Thanks for the response!  I've tried that, with many different configs.  I still get the same message, and no indexing!  Here is today's log message:

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 12288 bytes) in /home/<MYSTORE>/public_html/shop/vendor/magento/module-developer/Console/Command/XmlConverterCommand.php on line 125.

I have the cron running every minute, but nothing happens.  Here's one of the cron jobs:

/usr/local/bin/php /home/<MYSTORE>/public_html/shop/bin/magento cron:run | grep -v "Ran jobs by schedule" >>

Offline MrPhil

  • Senior Moderator
  • Berserker Poster
  • *****
  • Posts: 6219
Re: Magento 2 Install Issues
« Reply #3 on: July 18, 2016, 10:58:18 AM »
It looks like you didn't change the PHP settings correctly. The message tells you that only 32MB of memory was allowed, when it should have been 128MB. Or, maybe there was another memory setting that needed to be specified? Is your php.ini file in the public_html directory, as the suPHP_ConfigPath command indicates?

Make yourself a PHP script with the following:
Code: [Select]
<?php phpinfo(); ?>Run it from your browser before and after creating the php.ini file, or changing anything in it. You should see some of the settings change in the report. If they don't, you did something incorrectly.

You can try the suPHP_ConfigPath without the <IfModule> tags before and after it. Normally it's enabled for all Apache/Linux servers. You're not running on a Windows server (IIS, Windows Server), are you?
« Last Edit: July 18, 2016, 11:00:17 AM by MrPhil »
Visit My Site

E-mail Me
  
-= From the ashes shall rise a sooty tern =-

Offline johannsf

  • Newbie
  • *
  • Posts: 5
Re: Magento 2 Install Issues
« Reply #4 on: July 19, 2016, 08:40:25 AM »
I did a hunt for any memory throttling code in the .php .htaccess files, but still can't find the file that's restricting the memory.  I did find a completely different cron instruction for shared hosting - apparently the one softacoulus installs is incorrect.  The suggest:

/usr/local/bin/php /home/username/public_html/bin/magento setup:cron:run | awk '{ print strftime("\%Y-\%m-\%d \%H:\%M:\%S"), $0; fflush(); }' 2>&1 >> ~/magento_cron.log

and running every 15 minutes, but I still get this result:
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 12288 bytes) in /home/<mysite>/public_html/shop/vendor/magento/module-developer/Console/Command/XmlConverterCommand.php on line 125

This is very frustrating because it has stopped my Magento install dead, and I don't know how to get it on track.


Offline MrPhil

  • Senior Moderator
  • Berserker Poster
  • *****
  • Posts: 6219
Re: Magento 2 Install Issues
« Reply #5 on: July 19, 2016, 11:21:14 AM »
You only have 32MB of memory allowed, not the 128MB you want. Follow the instructions I gave and confirm that your php.ini file is in fact being read and processed.

I will assume that your server allows something more than 32MB. MichaelT is on the support staff, so if he says to try 128MB, it likely will be allowed.
Visit My Site

E-mail Me
  
-= From the ashes shall rise a sooty tern =-

Offline johannsf

  • Newbie
  • *
  • Posts: 5
Re: Magento 2 Install Issues
« Reply #6 on: July 20, 2016, 06:37:47 AM »
Here is a shot of the phpinfo:

It is set at 128mb.

I read through the report and the only other possible limit is in the MYSQL:

 I don't know if that has any bearing, and I don't know where to alter these settings.

Offline MrPhil

  • Senior Moderator
  • Berserker Poster
  • *****
  • Posts: 6219
Re: Magento 2 Install Issues
« Reply #7 on: July 20, 2016, 09:23:56 AM »
Hmm. Any other "memory" entries in phpinfo's output that say 32M? Or something close to that? I don't think the problem is in MySQL. You may have to add another entry to php.ini, if we can figure out where the limitation is.
Visit My Site

E-mail Me
  
-= From the ashes shall rise a sooty tern =-

Offline johannsf

  • Newbie
  • *
  • Posts: 5
Re: Magento 2 Install Issues
« Reply #8 on: July 21, 2016, 10:28:03 AM »
I think I need to pull the plug on LunarPages for my Magento 2 hosting.  There does not seem to be a way to make it work, and there are other hosts that specialize in M2 hosting.  Thanks for the help!

Offline MichaelT

  • Support
  • Jabba the Hutt
  • *****
  • Posts: 579
Re: Magento 2 Install Issues
« Reply #9 on: July 21, 2016, 11:30:42 PM »
If you are trying to adjust MySQL related settings on the shared server that is not something that you can do however, the memory settings for PHP can be modified up to a certain point using the php.ini and .htaccess files. If you haven't already do so, you may want to open a ticket with support and get someone to check and make sure the custom php.ini settings you are adding are propagating to all subdirectories.

 

Share |