cancel
Showing results for 
Search instead for 
Did you mean: 

Adjusting memory_limit on shared hosting

Re: Adjusting memory_limit on shared hosting


@clary_pollack wrote:

Would anyone happen to have an answer yet? This has been the biggest headache. Thank you Smiley Happy

Your best bet is to get assistance with your hosting provider about this and if they can't help, maybe it's time to consider changing host.

Re: Adjusting memory_limit on shared hosting

There are (supposedly) some workarounds...My phpinfo.php file does show that both local and master memory are set to 2G. So I think this may be a Magento issue. Am looking into this and will let you know if I find anything. Thank you Smiley Happy

Re: Adjusting memory_limit on shared hosting

I have also the same issue.

Cannot force Magento 2.2 to look at my local settings.

It's still looking at the higher php.ini configuration of the shared hosting and impossible to change it. Spent 3 hours with GoDaddy to hear finally that the upgrade to 756Mb isn't in their scope. A higher hosting plan haven't any garantee to resolve the problem.

What a pity. The solution would then to Force Magento to look at the Local config, but did anyone progressed on this side?

Re: Adjusting memory_limit on shared hosting


@françois_villon wrote:

I have also the same issue.

Cannot force Magento 2.2 to look at my local settings.

It's still looking at the higher php.ini configuration of the shared hosting and impossible to change it. Spent 3 hours with GoDaddy to hear finally that the upgrade to 756Mb isn't in their scope. A higher hosting plan haven't any garantee to resolve the problem.

What a pity. The solution would then to Force Magento to look at the Local config, but did anyone progressed on this side?


If I understand you correctly, what you are saying is that GoDaddy does not support having PHP Memory_Limit beyond 756M, or do you mean to say that they do not intend to assist you in setting the correct values? 

Re: Adjusting memory_limit on shared hosting

Dear James, Probably the second statement is true, because I am sure that they have technically the possibility to increase the Master php.ini to 756mb.

But as a user and in cPanel I am limited to set this "Master" value at 512Mb.

As I am in shared Hosting, if they increase it at the root, I suppose they will not increase it only for myself, which we can understand would have impact on their infrastructure. On the Other Hand the gentlemens claims to sell you some hosting plans with 2Gb of Ram !?!? and give you allowance on the PHP server only for 512mb. Very painfull for the statging phase of Magento 2.2

 

I couldn't reach a Tech "Lead" in order to request an extension of the Master php.ini up to 756mb. And the GD Technician said it was out of his scope (polite way to say that he can't change it). However he extensively verified the possibility to create/configure localized php.ini in my public_html folder. This didn't work as Magento Always pull-in the Master php.ini (@512) and not the localized value (@756). On the Other hand it could somewhat be evident that Master Value would superseed Local Value. But worth exploring this option anyway.

 

I didn't find a way to force Magento 2.2 to look at the local value. Some people in forums there and there are Always suffering in searching a solution. I've seen some example of gentlemens attempting also to embedd the CRON setup in the affair. Didn't find anyone who succeded so far.

 

So, for the moment I am locked into my Magento 2.2 expansion project.If you have any idea, it's more than welcome. Have a good day ! 

 

 

Re: Adjusting memory_limit on shared hosting

@françois_villon This sounds like a limiation of their hosting environment and if they aren't able to solve the problem, you may want to consider going with a provider who specializes in Magento as they will definitely not have issues like this (and even if they do, they will be more willing to help you resolve the problem). 

Re: Adjusting memory_limit on shared hosting

  1. Create a new php.ini file in the root directory of your Magento installation.
  2. Set the desired memory_limit value in the new php.ini file (e.g., memory_limit = 2048M).
  3. Edit the .htaccess file in the Magento root directory.
  4. Add the following line at the beginning of the .htaccess file: SetEnv PHPRC /path/to/your/php.ini Replace "/path/to/your/php.ini" with the actual path to your php.ini file.
  5. Verify the changes by accessing a PHP info file (e.g., info.php) in your browser, and check the "Loaded Configuration File" value for the path to the local php.ini file.

Note: For CLI usage, consult your hosting provider for instructions on modifying the memory limit for the command line.