Skip to content

Instantly share code, notes, and snippets.

@peterjaap
peterjaap / varnish6.vcl
Last active March 13, 2024 21:57
Updated Magento 2 Varnish 6 VCL, in cooperation with Varnish Software
# A number of these changes come form the following PR's; , combines changes in https://github.com/magento/magento2/pull/29360, https://github.com/magento/magento2/pull/28944 and https://github.com/magento/magento2/pull/28894, https://github.com/magento/magento2/pull/35228, https://github.com/magento/magento2/pull/36524, https://github.com/magento/magento2/pull/34323
# VCL version 5.0 is not supported so it should be 4.0 even though actually used Varnish version is 6
vcl 4.1;
import std;
# The minimal Varnish version is 6.0
# For SSL offloading, pass the following header in your proxy server or load balancer: '/* {{ ssl_offloaded_header }} */: https'
backend default {
.host = "/* {{ host }} */";
@JesKingDev
JesKingDev / Database Fix for AUTO_INCREMENT exceeds max value.md
Last active February 15, 2024 15:16
Data fix for the scenarios where gaps in a table's auto_increment result in the next value exceeding the max size of an INT. Specifically helps address the Magento Issue - AUTO_INCREMENT grows on every INSERT ... ON DUPLICATE on InnoDB tables #28387 ttps://github.com/magento/magento2/issues/28387

AUTO_INCREMENT grows on every INSERT ... ON DUPLICATE on InnoDB tables #28387

magento/magento2#28387

Symptom:

General system exception happened. SQLSTATE[22003]: Numeric value out of range: 167 Out of range value for column 'value_id' at row 1, query was: INSERT INTO catalog_product_entity_varchar (row_id,attribute_id,store_id,value) VALUES (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (

@piotrekkaminski
piotrekkaminski / MPERF-10565.diff
Created April 8, 2019 18:04
MPERF-10565.diff - logging to a file that does not exist issue
diff --git a/app/Mage.php b/app/Mage.php
index 0e650eebb4f..9c18e222689 100644
--- a/app/Mage.php
+++ b/app/Mage.php
@@ -798,9 +798,9 @@ public static function log($message, $level = null, $file = '', $forceLog = fals
',',
(string) self::getConfig()->getNode('dev/log/allowedFileExtensions', Mage_Core_Model_Store::DEFAULT_CODE)
);
- $logValidator = new Zend_Validate_File_Extension($_allowedFileExtensions);
$logDir = self::getBaseDir('var') . DS . 'log';