peachpie icon indicating copy to clipboard operation
peachpie copied to clipboard

Memory Usage

Open ceicomcloud opened this issue 4 years ago • 5 comments

Hi,

All Stream function, pack/unpack and str is ok ! My project run and is functionnal !! but... image

Seems like we have big problem in memory management (stream_set_blocking ?) :) (this screen taked after 2min)

On debugger we have that: PHP (Warning): Socket error: Une opération non bloquante sur un socket n’a pas pu être achevée immédiatement. PHP (Warning): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

ceicomcloud avatar Feb 26 '21 08:02 ceicomcloud

Seems more like a typical .NET process, consuming as much memory as it can, until garbage collection occurs.

Program in PeachPie, in particular, does not free global variables - recommending to nullify them or even better use functions or classes to encapsulate the main program.

Not probably caused by socket functions.


You can always use Visual Studio's Diagnostic Tools and make a memory dump to see what objects are consuming most of the memory.

jakubmisek avatar Feb 26 '21 13:02 jakubmisek

@ceicomcloud did you find anything suspicious using the memory profiler/diagnostic tools?

If you'd post the list of objects on the heap, we might help.

jakubmisek avatar Mar 03 '21 16:03 jakubmisek

If you'd have a test scenario/test project, we'd be happy to profile it and find eventual issues.

jakubmisek avatar Mar 26 '21 23:03 jakubmisek

Hi,

If u have discord or mail i can sent u my test project

ceicomcloud avatar Mar 29 '21 07:03 ceicomcloud

@ceicomcloud thank you - it's info at iolevel.com

jakubmisek avatar Mar 29 '21 11:03 jakubmisek