3

I just installed Magento 2 on MAMP (MacBook Pro) without Composer, but it is extremely slow.

What should I do, step by step, please? Also, how can I set PHP memory limit?

4
  • We can increase the PHP memory limit: stackoverflow.com/questions/25996782/… Aug 6, 2016 at 10:07
  • I have also tried: /Applications/MAMP/bin/php/php[your_php_version]/conf/php.ini then edit memory limit, but nothing changed.
    – iHaifaa
    Aug 8, 2016 at 3:03
  • Restart your web service? Aug 8, 2016 at 3:06
  • MAMP can't be opened anymore, I don't know why
    – iHaifaa
    Aug 8, 2016 at 3:13

6 Answers 6

1

When to delete the logs file of MAMP, sometime when an error appear, the log will be write to logs file, and if the size of file too big, this will make MAMP slow.

enter image description here

Try to delete 3 file inside log folder:

enter image description here

Restart MAMP, hope it help!

1

Under the PHP tab enable 'Individual PHP version for every host (CGI mode). This makes a massive difference in performance.

Individual PHP version for every host (CGI mode)

0

You can increase your php memory limit with ini_set('memory_limit', '64M'); in the index.php file of the Magento system or find php.ini file which is used from MAMP and look for memory_limit setting:

; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit
memory_limit = 1024M

Can you define it is "extremely slow"?

1
  • I have tried: /Applications/MAMP/bin/php/php[your_php_version]/conf/php.ini then edit memory limit, but nothing changed. now, MAMP can't be opened. I mean the page takes 1 minute to refresh (frontend or admin side)
    – iHaifaa
    Aug 8, 2016 at 3:07
0

From my experience, I usually work on Ubuntu and Windows environment.

--Before setting up a new Magento 2 site, we should check Prerequisites from Magento doc. It is a good place to start our journey. There are some configuration for PHP and server.

--If we set up Magento 2 successfully, we usually go to the Home page, if the page is broken, seem that we need to run the static content deploy.

--If the page show properly, but quite slow, please check your Magento Cache. We can read more here.

--Additionally, if we want to have a "cool" setup environment, we can use Vagrant or Docker.

[EDIT]

-Need to have a "strong" computer when working with Magento 2 tasks: deploy, reindex.

0

After performing the steps @Onshop & @Nero Phung mentioned I still had a slow load time.

I looked at the newly generated log files again and found the mysql log file had hundreds of lines again after one page load. In my case it mentioned:

Please run mysql_upgrade

To do this, simply click Tools > Upgrade MySQL Databases in the MAMP toolbar. I also closed other instances of MySQL running apps such as MySQL Workbench and Sequel Pro.

I hope this helps someone!

3
  • You have not told us, if you are OK at this point in time. If mysql_upgrade resolved your problem please tell the community. Aug 24, 2019 at 17:14
  • @WilsonHauck I did not notice a big enough difference to say it did for a fact but I imagine it had to b/c on every page load it wrote this to the log file hundreds of times. You can imaging that this file starts to become very large after some time which could account for some slowness. To answer your question, in my case it wasn't a very noticeable difference but I didn't test that closely either. Aug 24, 2019 at 19:05
  • @iHaifaa When you are READY for a noticeable difference, additional information request. Post on pastebin.com and share the links. RAM size of your MySQL Host server Text results of: B) SHOW GLOBAL STATUS; after minimum 24 hours UPTIME C) SHOW GLOBAL VARIABLES; D) SHOW FULL PROCESSLIST; E) complete MySQLTuner report AND Optional very helpful information, if available includes - htop OR top OR mytop for most active apps, ulimit -a for a linux/unix list of limits, iostat -xm 5 3 for IOPS by device and core/cpu count for server workload tuning analysis for suggestions. Aug 24, 2019 at 21:40
-1

I would recommend you to install vault on your machine! I am using this on my mac , and it is fast and easy to use.

https://www.vaultproject.io/intro/getting-started/install.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.