Memory usage leak when long operation
cvelasco88 opened this issue · comments
What steps will reproduce the problem?
Execute many operations on script
What is the expected result?
script executed
What do you get instead?
error because Memory limit
Additional info
Info about PHP inside docker container:
PHP version: 8.3.0
PHP 8.3.0 (cli) (built: Dec 16 2023 02:31:11) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.0, Copyright (c) Zend Technologies
with Zend OPcache v8.3.0, Copyright (c), by Zend Technologies
with Xdebug v3.3.1, Copyright (c) 2002-2023, by Derick Rethans
Q | A |
---|---|
Yii version | 2.0.? |
PHP version | 8.3.0 |
Operating system | Ubuntu info_system.txt |
Using docker "Current version: 4.27.0 (135262)".
from repo:
https://github.com/cvelasco88/azerothcore-wotlk/tree/main/apps/web-app
Memory usage on different points (without executing callback & executing callback). Number of records ~50k.
Are you sure it's caused by framework and not the application itself?
By default Logger::flush()
does not flush all messages from memory - it only dispatches messages from logger to log targets (that will keep these messages in memory). You need to pass true
as argument to this method if you want to flush messages completely.
Also, make sure you don't have debug module active, it will keep all debug info in memory.