Hi,
When an user does a REGISTER and has a large number of msilo messages stored, say 7k, kamailio server easily runs out of private memory when trying to allocate memory to the result set. I know I can set a max on the messages a user can store, but I'd like to support a crazy number like 7k messages. I'm trying to introduce paging to the query. So that I can process N number of results at one time. I can't find an easy way of doing this with the current MySQL driver. The db_mysql_query() function doesn't have built-in paging and with this function it's not easy to build a complex query like this:
Select * from silo where ...(the matching algorithm) AND id > lower_limit AND id < higher_limit, ordered by id.
Is there a way to do this? Or maybe I'm on the wrong track and there is already a solution to this problem?
Regards,
Allen Zhang
Allen,
Perhaps your best bet is simply to increase the amount of allocated private memory?
-- Alex
On 06/04/2014 08:18 PM, Allen Zhang wrote:
Hi,
When an user does a REGISTER and has a large number of msilo messages stored, say 7k, kamailio server easily runs out of private memory when trying to allocate memory to the result set. I know I can set a max on the messages a user can store, but I’d like to support a crazy number like 7k messages.
I’m trying to introduce paging to the query. So that I can process N number of results at one time.
I can’t find an easy way of doing this with the current MySQL driver. The *db_mysql_query**() *function doesn’t have built-in paging and with this function it’s not easy to build a complex query like this:
Select * from silo where …(the matching algorithm) AND id > lower_limit AND id < higher_limit, ordered by id.
Is there a way to do this? Or maybe I’m on the wrong track and there is already a solution to this problem?
Regards,
Allen Zhang
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Not ideal because I have many TCP children. And each of them consumes private memory.
-----Original Message----- From: sr-users-bounces@lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of Alex Balashov Sent: Thursday, 5 June 2014 3:55 p.m. To: sr-users@lists.sip-router.org Subject: Re: [SR-Users] MySQL query result pagination
Allen,
Perhaps your best bet is simply to increase the amount of allocated private memory?
-- Alex
On 06/04/2014 08:18 PM, Allen Zhang wrote:
Hi,
When an user does a REGISTER and has a large number of msilo messages stored, say 7k, kamailio server easily runs out of private memory when trying to allocate memory to the result set. I know I can set a max on the messages a user can store, but I'd like to support a crazy number like 7k messages.
I'm trying to introduce paging to the query. So that I can process N number of results at one time.
I can't find an easy way of doing this with the current MySQL driver. The *db_mysql_query**() *function doesn't have built-in paging and with this function it's not easy to build a complex query like this:
Select * from silo where ...(the matching algorithm) AND id > lower_limit AND id < higher_limit, ordered by id.
Is there a way to do this? Or maybe I'm on the wrong track and there is already a solution to this problem?
Regards,
Allen Zhang
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Alex Balashov - Principal Evariste Systems LLC Tel: +1-678-954-0670 Web: http://www.evaristesys.com/, http://www.alexbalashov.com/
Please be kind to the English language:
http://www.entrepreneur.com/article/232906
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
On 06/04/2014 11:56 PM, Allen Zhang wrote:
Not ideal because I have many TCP children. And each of them consumes private memory.
Yes, but I would think it the superior method to trying to reengineer db_mysql & libsrdb1.
Hi Alex,
Yes but I have MANY tcp children. Can I use a raw query to do what I wanted? Never got raw query working before.
Allen
-----Original Message----- From: sr-users-bounces@lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of Alex Balashov Sent: Thursday, 5 June 2014 3:58 p.m. To: sr-users@lists.sip-router.org Subject: Re: [SR-Users] MySQL query result pagination
On 06/04/2014 11:56 PM, Allen Zhang wrote:
Not ideal because I have many TCP children. And each of them consumes private memory.
Yes, but I would think it the superior method to trying to reengineer db_mysql & libsrdb1.
-- Alex Balashov - Principal Evariste Systems LLC Tel: +1-678-954-0670 Web: http://www.evaristesys.com/, http://www.alexbalashov.com/
Please be kind to the English language:
http://www.entrepreneur.com/article/232906
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users