Git Product home page Git Product logo

Comments (9)

BitOne avatar BitOne commented on September 23, 2024

Hi @Shkarbatov ,

It's difficult to tell exactly what is happening. It could be one of the following reason:

from php-meminfo.

Shkarbatov avatar Shkarbatov commented on September 23, 2024

you didn't reach yet 10.000 items in the GC buffer,

I try it with the GC:
gc_collect_cycles();
meminfo_dump(fopen('/home/dmitriy/phpmem/my_dump_file_'.$i.'.json', 'w'));

Result is the same.

from php-meminfo.

Shkarbatov avatar Shkarbatov commented on September 23, 2024

sometimes a memory leak in PHP can comes from one of its extension.

I understand this, but if I see difference in meminfo dump, isn't it's don't mean that I can see difference in meminfo?

For 2 iteration:

string - 30415 - 1271927
array - 16665 - 1199880
null - 6708 - 107328
boolean - 5667 - 90672
integer - 3025 - 48400

For 43 iteration:

string - 32970 - 1345086
array - 18103 - 1303416
null - 6720 - 107520
boolean - 5937 - 94992
integer - 3117 - 49872

from php-meminfo.

Shkarbatov avatar Shkarbatov commented on September 23, 2024

If XHProf show me, there is no any difference in memory between 2 and 43 iteration, but memory_get_usage() show that memory is rising. What it can be? GC run in each iteration.

from php-meminfo.

BitOne avatar BitOne commented on September 23, 2024

Maybe you have a small leak of PHP items that you can see in phpMeminfo and a big leak coming from an extension. Can you provide the two full dump files instead of the summaries (for your iterations 2 and 43) ?

from php-meminfo.

Shkarbatov avatar Shkarbatov commented on September 23, 2024

Adding dumps 3 and 389 iteration:
https://drive.google.com/drive/folders/1izeyMBlf85y09Or0BeCd70yfqE8_ygWb?usp=sharing

from php-meminfo.

Shkarbatov avatar Shkarbatov commented on September 23, 2024

In example there is Symfony\Component\Stopwatch\StopwatchPeriod, I disabled it and repeated script - result is the same.

from php-meminfo.

shxofficial avatar shxofficial commented on September 23, 2024

Is there any update on this? i have the same situation but cannot solve it...

from php-meminfo.

BitOne avatar BitOne commented on September 23, 2024

Hey @Shkarbatov and @shxofficial ,

Do you have any code that you could share so we can reproduce the issue?

By the way, I'm thinking of adding an option to dump the content of the strings. Would that be helpful for you?

from php-meminfo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.