nexcess / magento-turpentine

A Varnish extension for Magento.
GNU General Public License v2.0
519 stars 253 forks source link

Let's test Turpentine with different Varnish versions #1528

Open ADDISON74 opened 5 years ago

ADDISON74 commented 5 years ago

This is not an issue. I started using Turpentine long time ago and I would like to thank all for their dedication in making Magento the best shopping cart in the world. Because I was hired to upgrade old versions of Debian I was in the position to run tests in VM before going in production with the latest versions of Debian, Magento, Varnish, PHP, Apache. I would like to share my experience hoping others will do the same thing here.

I am using Debian 9.6 Stretch for testing. My configuration is in front Pound as SSL wrapper, Varnish in the middle and Apache 2.4 at the end with 1 vhost. Magento CE 1.9.4.0 , PHP 7.0.33, Percona DB 5.7. As Turpentine extension I am using devel version.

This is a great resource for installing manually different versions of Varnish: https://packagecloud.io/varnishcache

I started installing Varnish 4.0.5, then 4.1.10. Believe me or not, I found no issues in Varnish/Turpentine using 2 different browsers in the same time, logging customers, adding to cart, placing orders, creating new customer accounts.

Observation 1: It will be great if we can choose the right Varnish version in backend [Varnish Versions] drop-down list. The last one is 4.1.X.

Observation 2: I switched from FCGI to PHP-FPM. It is easy to achieve in Apache 2.4. Install php7.0-fpm and run a2enconf php7.0-fpm.conf. Restart apache service and you have php-fpm working. I had a few issues:

I guess it is a configuration issue in php-fpm. I will solve it after intensive testing.

If you still read Issues section of this nice extension I would like to know your experience in working with different OS/Varnish versions. Please share your opinions here. Even Magento 2 is out of the box ready for Varnish I prefer the old school. Magento 1 is still the champ. Thank you.

ADDISON74 commented 5 years ago

Issue in categories in Varnish 5.1.3, 5.2.1 and 6.1.1. Buttons [Add to Cart], [Add to Whislist] and [Add to Compare] are affected.

For every link Turpentine breaks the tag. Here is source code for Add to Compare button:

<a href="https://www.mydomain.com/catalog/product_compare/add/product/423/uenc/aHR0cHM6Ly93d3cubW1zcG9ydC5yby9zYWxlLmh0bWw_ZGlyPWFzYyZhbXA7bGltaXQ9MjQmYW1wO21vZGU9Z3JpZCZhbXA7b3JkZXI9cHJpY2U,/form_key/&lt;esi:include src=" http:="" www.mydomain.com="" turpentine="" esi="" getformkey="" ttl="" 3600="" method="" scope="" global="" access="" private="" "="">/" class="link-compare"&gt;Add to Compare</a>

image2

ADDISON74 commented 5 years ago

Issues in product pages in Varnish 5.1.3, 5.2.1 and 6.1.1. Button [Add to Cart] is not working and there is a message above the product name. Buttons [Add to Whislist] and [Add to Compare] having wrong html tags in source code. Turpentine breaks the tag adding in the link esi code.

image1

ADDISON74 commented 5 years ago

To solve the issues above in Varnish 5 all versions you must have this line in /etc/systemd/system/varnish.service:

ExecStart=/usr/sbin/varnishd -a localhost:8090 -T localhost:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secret -p feature=+esi_ignore_other_elements -p vcc_allow_inline_c=on -p cli_buffer=16384 -s malloc,512m

Please note you could have a different listen port than localhost:8090.

ADDISON74 commented 5 years ago

Starting with version 6, cli_buffer is resized dynamically. In order to install Varnish 6.1.1, before doing the installation from repository you should remove "-p cli_buffer=16384" from the file /etc/systemd/system/varnish.service.

If you install Varnish 6.1.1 without removing the parameter installation will fail. Edit the mention file, run command "systemctl daemon-reload" then run command "apt-get install -f". You should restart varnish service at the end.

ExecStart=/usr/sbin/varnishd -a localhost:8090 -T localhost:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secret -p feature=+esi_ignore_other_elements -p vcc_allow_inline_c=on -s malloc,512m