Comments (14)
@JeroenVanLeusden I think this is a Magento bug: magento/magento2#8084 (comment) BUT they say it's fixed in v2.2.x (I'm very skeptical)...
What version of Magento are you running?
from magento2-cronjobmanager.
We're on 2.2.2, should be fixed in 2.2.3 so maybe there is no issue after we upgraded the webshop.
from magento2-cronjobmanager.
@JeroenVanLeusden Not ready to give up investigating just yet!
I setup my local environment to be on version 2.2.2 and ran a large sql query to load a little over 10,000 crons in cron_schedule, and I loaded up the Timeline with no errors.
I tried this on production mode and developer mode; I'm using CJM v1.5.0, testing on Ubuntu 16.04 (doubt that the OS is the issue, but I figure it's worth mentioning). Still no luck.
BUT, I grepped for the error you posted above and found it in var/log/system.log with a time stamp of April 29th, but I have no idea how to trigger it again.
Do you have any other information to help me reproduce? Maybe some steps? Can you consistently reproduce this error?
from magento2-cronjobmanager.
We consistently see this error, which makes me believe it might be a php configuration somewhere? We run the following:
- Ubuntu 16.04.1 LTS
- PHP 7.0.28-1
- max_execution_time => 18000
- max_file_uploads => 50
- max_input_nesting_level => 64
- max_input_time => 60
- max_input_vars => 10000
- memory_limit => 2048M
from magento2-cronjobmanager.
Just checked my cron_schedule
and saw a whopping 170k records. After flushing them there are ~13k records.
The warning message disappeared but not my browser window is crashing trying to render the timeline.
from magento2-cronjobmanager.
I don't think it's a PHP configuration. See this comment here: magento/magento2#8084 (comment). I think by pulling 170k records through the uiComponent we're going way over the 10MB limit set by libxml.
I didn't account for the timeline to be able to support over 100k records. This is most definitely attributed to a Magento core bug: magento/magento2#11002
There is a PR that was merged that (supposedly) fixes this here: magento/magento2#12497 (I personally haven't seen this issue happen on v2.2.3, so maybe it does work).
But, while the timeline may not be able to support 100k records, this does bring an issue to light regarding performance on the timeline.
This is something we can fix. I noticed performance starts to slow down at ~2k records.
I'm going to close this issue and blame Magento on this one, but I will open another issue regarding performance in another ticket.
Thanks for helping troubleshoot this issue! If you still have concerns, feel free to comment even if the issue is closed, or create a new issue if another arises.
from magento2-cronjobmanager.
@Ethan3600 This is related to the issue #65 ?
I have the same problem in version 2.2.5
from magento2-cronjobmanager.
Yep. Is that still happening on the latest version? I hardcoded a limit to the amount of crons hoping it'll be low enough so we don't see this error.
from magento2-cronjobmanager.
@Ethan3600 The problem is not really related to the module, but a problem with clearing the cron history.
The store was over 100k records.
Thank you very much for your attention.
from magento2-cronjobmanager.
Hmm. I was able to reproduce this by loading over 100k crons in the timeline. Are you sure it has to do with clearing the cron history? I was under the assumption that we're just loading too much crons in the timeline (hence the limit)
from magento2-cronjobmanager.
Yes, exactly, but the magento "core" should not accumulate more than 100,000 crons without cleaning automatically.
And on the other hand the CronjobManager even with the last patches, could not limit the lines I guess..
from magento2-cronjobmanager.
@amelojunior agreed; this behaviour is due to a Magento core bug. However, we do have control as far as the amount of records that are loaded into the timeline. We're simply querying the database with a limit.
This, unfortunately, was a lazy solution on my part. The real problem is described in this comment.
We're not allowed to load over 10MB of JSON (within the contents of a single element). To quickly remedy this problem I forced our query to have a page size (aka limit) of 35,000. You can see the construction of this query here
To my knowledge, there's no way to limit a query by the size of the data (in MB). I'll need to really think about a solution for this. I could drop the limit further, or make it configurable (via a setting), but I'd rather avoid doing that.
from magento2-cronjobmanager.
Another less elegant way around this apart from clearing the cron history is patching Magento Core file:
/var/www/html/vendor/magento/framework/View/TemplateEngine/Xhtml/Template.php
amend public function append($content)
to:
$target = $this->templateNode->ownerDocument;
$source = new \DOMDocument();
$source->loadXml($content, LIBXML_PARSEHUGE);
$this->templateNode->appendChild(
$target->importNode($source->documentElement, TRUE)
);
This then will allow you to load it up even with your cron history. Not sure about the perfomance though. I have simply changed the cron history time to be 600 seconds for now will monitor and was using M2.3.4 EE.
from magento2-cronjobmanager.
I'm pretty sure this has been fixed by now. We had a similar issue in https://github.com/elgentos/LargeConfigProducts but haven't seen it for years.
from magento2-cronjobmanager.
Related Issues (20)
- Magento 2.4 support HOT 7
- Dashboard entries don't show any information HOT 1
- Assets
- Component\Filters class replaces the original one with missing values HOT 1
- Add "Job-Code" to Filter in Adminhtml HOT 1
- SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock. HOT 2
- Get the ID of the admin user that scheduled the currently running job? HOT 6
- Compatible with PHP 8.1 HOT 2
- PHP 8.1: Deprecated Functionality: Optional parameter $jobId declared before required parameter $jobCode
- PHP 8.1 | Deprecated Functionality: Function strftime() is deprecated... HOT 10
- Magento 2.4.5 - Status Column (html.js) not working HOT 4
- PHP 8.2 / Magento 2.4.6 support HOT 2
- "Required parameter 'theme_dir' was not passed" when I dispatch now a cronjob in backend HOT 3
- Add Total time column in the management grid HOT 3
- Add a feature to reporting "missing" job HOT 4
- Sort by group results in Zend_Db_Statement_Exception HOT 4
- 2.1.0 Not Compatible With Magento < 2.4.6 HOT 8
- Can't execute action Schedule Now Cron Job in Grid Mass Action HOT 2
- Support config_path for cron expressions HOT 2
- PHP 8.3 Support HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from magento2-cronjobmanager.