View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0005933 | OXID eShop (all versions) | 4.08. Cache | public | 2014-10-24 16:44 | 2014-12-02 12:35 |
| Reporter | itsabug | Assigned To | |||
| Priority | normal | Severity | major | Reproducibility | always |
| Status | closed | Resolution | no change required | ||
| Product Version | 4.9.0 / 5.2.0 | ||||
| Summary | 0005933: Default cache backend with filesystem eats huge amount of memory | ||||
| Description | When the default cache backend is enabled and used with the filesystem connector, loading huge lists of database objects lets your memory usage explode. Cache somehow keeps information in memory and does not free them afterwards. | ||||
| Steps To Reproduce | 1. Activate the default cache backend with file system as cache connector 2. load many objects, for example with this script: require_once dirname(__FILE__) . '/../www/bootstrap.php'; $config = oxRegistry::getConfig(); $list = oxDb::getDb(oxDB::FETCH_MODE_ASSOC)->execute("SELECT oxid FROM oxarticles where oxactive = 1"); while($list->EOF === false) { $id = $list->fields['oxid']; $article = oxNew('oxarticle'); $article->load($id); $list->moveNext(); var_dump(memory_get_usage()); } 3. execute without default backend cache. the memory does not change that much 4. activate default backend cache and execute it again -> memory usage increases | ||||
| Tags | No tags attached. | ||||
| Theme | Azure | ||||
| Browser | All | ||||
| PHP Version | any | ||||
| Database Version | any | ||||
|
|
this is not a bug. Cachebackend itself has internal cache, which store data requested with cache connector. so if there a lot request from cache its additionally store internally for performance reason for that memory is used. if the use case is to import a lot of data or etc fost likly u do not need cache, so turn of cachebackend usage in this script. config option blCacheActive = false; |