If I update (via Composer Update) to 2.2.10 I immediately get time-out errors loading my site. Downgrading back to 2.2.8 fixes the issue.
Have you folks changed anything related to, or added more, logging? Any ideas where I should look?
In php_errors.log I find:
[16-Dec-2019 12:37:55 Australia/Melbourne] PHP Fatal error: Maximum execution time of 120 seconds exceeded in /var/www/vhosts/c3-dev/vendor/yiisoft/yii2/base/Component.php on line 601
[16-Dec-2019 12:37:56 Australia/Melbourne] PHP Fatal error: Allowed memory size of 2147483648 bytes exhausted (tried to allocate 98570240 bytes) in /var/www/vhosts/c3-dev/vendor/opis/closure/functions.php on line 20
Feels like there might be some sort of infinite loop in serialising an object or something?
(I also updated Craft itself, but it's the Commerce update that seems to be the issue as it fixes itself if I revert just the Commerce updates)
The error on the page when it times out is:
Maximum execution time of 120 seconds exceeded
1. in /var/www/vhosts/c3-dev/vendor/yiisoft/yii2-debug/src/LogTarget.php at line 134
125126127128129130131132133134135136137138139140141142143
* This method will filter the given messages with [[levels]] and [[categories]].
* And if requested, it will also export the filtering result to specific medium (e.g. email).
* @param array $messages log messages to be processed. See [[\yii\log\Logger::messages]] for the structure
* of each message.
* @param bool $final whether this method is called at the end of the current application
* @throws \yii\base\Exception
*/
public function collect($messages, $final)
{
$this->messages = array_merge($this->messages, $messages);
if ($final) {
$this->export();
}
}
/**
* Removes obsolete data files
* @param array $manifest
*/
2. yii\base\ErrorHandler::handleFatalError()
Yes I agree.
I haven't found any error messages yet but this update took down my site. Essentially the site worked fine until the customer attempted to add a product to the cart. At that point it would end up timing out.
I had around 100 empty active carts and hundreds of 504 errors as the memory usage spiked.
Further info, when adding an item to the cart..:
– 2.2.8 works fine
– 2.2.9 gives me the error:
Calling unknown method: craft\commerce\services\Discounts::matchesLineItem()
– 2.2.10 gives me an internal server error and nothing useful in the logs
Hi @pixelmachine & @bossanova808
Could you try testing the latest commit for me in local development and let me know if this solves the issue.
You can do this by updating your composer.json as follows:
"require": {
"craftcms/commerce": "dev-develop#3feafb91e977c4945e34f16eb90d13116a398296 as 2.2.10",
"...": "..."
}
It would be a big help, thanks!
@nfourtythree tested, no errors for me – working as expected.
Thanks for the quick response @pixelmachine really appreciate it.
Will do some more testing and look to get a release out as soon as we can.
Sorry for delay @nfourtythree, busy time of year.... can confirm it is also fixed for me with this change.
I look forward to a release.....and I guess leave this open for others that may hit this, until you cut that release?
Fixed in 2.2.11 - thanks!