Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update from 2.2.8 to 2.2.10 breaks site... #1182

Closed
bossanova808 opened this issue Dec 16, 2019 · 8 comments
Closed

Update from 2.2.8 to 2.2.10 breaks site... #1182

bossanova808 opened this issue Dec 16, 2019 · 8 comments
Labels

Comments

@bossanova808
Copy link
Contributor

Description

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)

Steps to reproduce

  1. Upgrade site
  2. Load site index page...(front end - control panel loads ok)

Additional info

  • Craft version: 3.3.18.2
  • PHP version: 7.2
  • Database driver & version: MySQL 5.7
  • Plugins & versions: ... a bunch
@bossanova808
Copy link
Contributor Author

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()

@pixelmachine
Copy link

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.

@pixelmachine
Copy link

pixelmachine commented Dec 16, 2019

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

@nfourtythree
Copy link
Contributor

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!

@pixelmachine
Copy link

pixelmachine commented Dec 16, 2019

@nfourtythree tested, no errors for me – working as expected.

@nfourtythree
Copy link
Contributor

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.

@bossanova808
Copy link
Contributor Author

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?

@lukeholder
Copy link
Member

Fixed in 2.2.11 - thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants