1

I cloned my server version of a Magento install locally. I changed nothing (besides the base url) and it is extremely slow. With extremely I mean loading is almost not possible (up to a minute and more). The version on the server is just fine.

This only affects the frontend. The backend works fine.

I run it on a Mac with MAMP Pro with PHP 5.6.2 and MySQL 5.5.38. Machine is a new macbook pro with 16GB RAM and 2,8 GHz Intel Core i7.

PHP config:

max_execution_time = 600     
max_input_time = 600    
memory_limit = 512M    

MySQL config:

# The MySQL server
[mysqld]
socket      = /Applications/MAMP/tmp/mysql/mysql.sock
key_buffer = 1024M
max_allowed_packet = 512M
table_cache = 1024
sort_buffer_size = 4096K
net_buffer_length = 512K
read_buffer_size = 4096K
read_rnd_buffer_size = 4096K
myisam_sort_buffer_size = 1024M

log = /Applications/MAMP/logs/mysql_sql.log

[mysqldump]
quick
max_allowed_packet = 256M

[mysql]
no-auto-rehash

[isamchk]
key_buffer = 64M
sort_buffer_size = 64M
read_buffer = 8M
write_buffer = 8M

[myisamchk]
key_buffer = 64M
sort_buffer_size = 64M
read_buffer = 8M
write_buffer = 8M

Other sites on this Mac run just fine and fast.

Magento cache is activated and the indexes and the cache are up to date.

What could cause this?

  • Is the front-end trying to connect to some sort of external service and timing out? – Agop May 19 '15 at 18:16
  • I don't think so. My machine is online and connected to the internet, so timeouts shouldn't be an issue... – Øle Bjarnstroem May 20 '15 at 17:54
  • 2
    Right, but often times, production sites connect to services which cannot be accessed from the outside, or are otherwise limited in some manner. I see that you've resolved your problem, but this may help out someone else in a similar situation. – Agop May 20 '15 at 19:06
2

If it's only on the front-end it probably has to do with an installed extension.

It's for example possible that you have an extension that uses curl to retrieve data (for example a Twitter feed). If the data source can't be reached, it might take a while before the request times out, causing the page to take a very long time to load.

You can add <disable_local_modules>true</disable_local_modules> to your app/etc/local.xml in the general tag. It will disable all modules in app/code/local. Alternatively you can try to disable and re-enable each extension separately, change front-end theme etc.

Also you can try to install a fresh install of Magento and see if you experience the same issue. If not, it must be a custom extension.

If both front and back-end would be slow I'd expect it to be an issue with xDebug or similar.

  • Going into app/etc/modules and deactivating all extra extensions that I added did the trick I think. At least it now loads in ~20 sec, which is still painfully slow but much better than before... Oh, and don't forget to clear/rebuild the cache after that. – Øle Bjarnstroem May 20 '15 at 18:41
  • Further explanation on how to disable extensions: webmasters.stackexchange.com/questions/34244/… – Øle Bjarnstroem May 20 '15 at 19:01
  • Good to hear. You can also try to mount the var/cache and var/session in tmpfs memory. 20 seconds seems like a long time, maybe xDebug is enabled by default? It will slow down the system a lot (but is very handy when debugging of course) – Milan Simek May 20 '15 at 23:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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