noobIOSCoder / xmpphp

Automatically exported from code.google.com/p/xmpphp
0 stars 0 forks source link

memory use #37

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
hello,
I try to print out the memory,
start about 600kb
15:33 (2378160).
15:40 (2700896).
15:47 (3023652).
15:54 (3362852).
16:01 (3686168).
16:08 (4008968).

it seems xmpphp uses about 300kb every 7 minutes, and it will grow up until
max memory setting in php (finally quit).

how to enhance this? where should I put the unset to free the memory,
at least it doesn't eat a lot of memory...
because I need the xmpp run 24 hours a day (always connected)...

Thank you very much,

Original issue reported on code.google.com by fransg....@gmail.com on 12 Sep 2008 at 9:15

GoogleCodeExporter commented 9 years ago
Yup I'm encountering the same problem too

Original comment by chuau...@gmail.com on 3 Oct 2008 at 8:00

GoogleCodeExporter commented 9 years ago
could you please post your code how xmpphp is being used, then I can do a stack 
trace.

thank you.

Original comment by azn.guw...@googlemail.com on 24 Nov 2008 at 5:21

GoogleCodeExporter commented 9 years ago
Hello,
I use the code like the example, use version 50, and every 7 minutes I print the
memory used..
May be you can print what is your memory used ? (please run it about 1 hour)

while(!$xmpp->isDisconnected()) {
      $payloads = $xmpp->processUntil(array('message', 'presence', 'end_stream',
'session_start'), 1);
      foreach($payloads as $event) {
      } // end foreach
      if 7 minutes already, call memory_get_usage()
} // end while

Thank you

Original comment by fransg....@gmail.com on 25 Nov 2008 at 2:30

GoogleCodeExporter commented 9 years ago
Fixed in SVN

Original comment by nathanfr...@gmail.com on 26 Nov 2008 at 9:47