Hi Stefan,
I tested the IVR plugin with a simple script and sipp.
1 million call with 150cps the SEMS use ~30% of 2GB memory,
after that I decreased the cps to 35 and the memory usage went to ~12%.
Now the SEMS running with 35 cps and created more than 3 million call.
8-)
Now the memory leak and the crash seems to be fixed.
Thank you
Best Regards,
Balint
[email protected] wrote:
Author: sayer
Date: 2010-02-25 12:14:13 +0100 (Thu, 25 Feb 2010)
New Revision: 1632
Modified:
trunk/apps/ivr/Ivr.cpp
Log:
get GIL when DECREFing python object (obvious, but see also this thread:
http://osdir.com/ml/python-dev/2010-01/msg00056.html)
Modified: trunk/apps/ivr/Ivr.cpp
===================================================================
--- trunk/apps/ivr/Ivr.cpp 2010-02-23 15:28:13 UTC (rev 1631)
+++ trunk/apps/ivr/Ivr.cpp 2010-02-25 11:14:13 UTC (rev 1632)
@@ -759,17 +759,22 @@
return IvrSipRequest_FromPtr(new AmSipRequest(r));
}
+void safe_Py_DECREF(PyObject* pyo) {
+ PYLOCK;
+ Py_DECREF(pyo);
+}
+
void IvrDialog::onSipReply(const AmSipReply& r) {
PyObject* pyo = getPySipReply(r);
callPyEventHandler("onSipReply","(O)", pyo);
- Py_DECREF(pyo);
+ safe_Py_DECREF(pyo);
AmB2BSession::onSipReply(r);
}
void IvrDialog::onSipRequest(const AmSipRequest& r){
PyObject* pyo = getPySipRequest(r);
callPyEventHandler("onSipRequest","(O)", pyo);
- Py_DECREF(pyo);
+ safe_Py_DECREF(pyo);
AmB2BSession::onSipRequest(r);
}
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev
--
Balint Kovacs
Software Engineer
Gamma Telecom
Mobile +36 (06) 70 244 6677
Phone +44 (0) 207 078 8213
Email [email protected] <mailto:[email protected]>
Web www.gammatelecom.com <http://www.gammatelecom.com>
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev