<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
  <title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Hello,<br>
<br>
On 12/31/09 12:02 PM, alex pappas wrote:
<blockquote
 cite="mid:88b5e74c0912310302l129c01d7rb322d571652b0aa7@mail.gmail.com"
 type="cite">Hi,<br>
  <br>
>From the syslog when kamailio start ups I get the following:<br>
  <br>
  <br>
Dec 31 12:35:45 YGOR /usr/local/sbin/kamailio[10281]:
DBG:core:destroy_modules: shutting down module htable<br>
Dec 31 12:35:46 YGOR kamailio: DBG:core:yyparse: loading module
/usr/local/lib64/kamailio/modules/htable.so<br>
Dec 31 12:35:46 YGOR kamailio: DBG:core:register_module: register_pv:
htable<br>
Dec 31 12:35:46 YGOR kamailio: DBG:core:set_mod_param_regex: htable
matches module htable<br>
Dec 31 12:35:46 YGOR kamailio: DBG:core:set_mod_param_regex: found
&lt;htable&gt; in module htable [/usr/local/lib64/kamailio/modules/]<br>
Dec 31 12:35:46 YGOR kamailio: DBG:htable:ht_table_spec: htable [a] -
size [14]<br>
Dec 31 12:35:46 YGOR kamailio: DBG:htable:ht_table_spec: htable [a] -
dbtable [htable]<br>
Dec 31 12:35:46 YGOR kamailio: DBG:core:set_mod_param_regex: htable
matches module htable<br>
Dec 31 12:35:46 YGOR kamailio: DBG:core:set_mod_param_regex: found
&lt;db_url&gt; in module htable [/usr/local/lib64/kamailio/modules/]<br>
Dec 31 12:35:46 YGOR kamailio: DBG:core:set_mod_param_regex: htable
matches module htable<br>
Dec 31 12:35:46 YGOR kamailio: DBG:core:set_mod_param_regex: found
&lt;fetch_rows&gt; in module htable [/usr/local/lib64/kamailio/modules/]<br>
Dec 31 12:35:46 YGOR kamailio: DBG:core:find_cmd_export_t: found
&lt;sht_print&gt;(0) in module htable
[/usr/local/lib64/kamailio/modules/]<br>
Dec 31 12:35:52 YGOR /usr/local/sbin/kamailio[10371]:
INFO:core:init_mod: initializing module htable<br>
Dec 31 12:35:52 YGOR /usr/local/sbin/kamailio[10371]:
DBG:htable:ht_db_open_con: database connection opened successfully<br>
Dec 31 12:35:52 YGOR /usr/local/sbin/kamailio[10371]:
DBG:htable:ht_db_load_tables: loading db table [htable] in ht [a]<br>
Dec 31 12:35:52 YGOR /usr/local/sbin/kamailio[10371]:
DBG:htable:ht_db_load_table: =============== loading hash table [a]
from database [htable]<br>
Dec 31 12:35:58 YGOR /usr/local/sbin/kamailio[10371]: DBG:htable<b>:ht_db_load_table:
Nothing to be loaded in hash table</b><br>
</blockquote>
<br>
this is caused by a check of number of rows which seems to be 0. I will
try to reproduce in the next days ...<br>
<br>
<blockquote
 cite="mid:88b5e74c0912310302l129c01d7rb322d571652b0aa7@mail.gmail.com"
 type="cite">Dec 31 12:35:58 YGOR /usr/local/sbin/kamailio[10371]:
DBG:core:init_mod: register MI for htable<br>
Dec 31 12:35:58 YGOR /usr/local/sbin/kamailio[10371]:
DBG:htable:pv_parse_ht_name: htable [a] - key [$rU]<br>
Dec 31 12:35:58 YGOR /usr/local/sbin/kamailio[10371]:
DBG:htable:ht_get_table: htable found [a]<br>
  <br>
In the mysql htable I see :<br>
  <br>
  <br>
mysql&gt; select count(*) from openser10.htable;<br>
+----------+<br>
| count(*) |<br>
+----------+<br>
|&nbsp; 1893255 | <br>
+----------+<br>
1 row in set (0.00 sec)<br>
  <br>
And ofcourse when I run the sht_print(); I get many errors since htable
in memory is empty:<br>
  <br>
Dec 31 12:52:48 YGOR /usr/local/sbin/kamailio[10375]:
ERROR:htable:ht_dbg: htable[1376] -- &lt;0&gt;<br>
Dec 31 12:52:48 YGOR /usr/local/sbin/kamailio[10375]:
ERROR:htable:ht_dbg: htable[1377] -- &lt;0&gt;<br>
Dec 31 12:52:48 YGOR /usr/local/sbin/kamailio[10375]:
ERROR:htable:ht_dbg: htable[1378] -- &lt;0&gt;<br>
Dec 31 12:52:48 YGOR /usr/local/sbin/kamailio[10375]:
ERROR:htable:ht_dbg: htable[1379] -- &lt;0&gt;<br>
Dec 31 12:52:48 YGOR /usr/local/sbin/kamailio[10375]:
ERROR:htable:ht_dbg: htable[1380] -- &lt;0&gt;<br>
Dec 31 12:52:48 YGOR /usr/local/sbin/kamailio[10375]:
ERROR:htable:ht_dbg: htable[1381] -- &lt;0&gt;<br>
Dec 31 12:52:48 YGOR /usr/local/sbin/kamailio[10375]:
ERROR:htable:ht_dbg: htable[1382] -- &lt;0&gt;<br>
Dec 31 12:52:48 YGOR /usr/local/sbin/kamailio[10375]:
ERROR:htable:ht_dbg: htable[1383] -- &lt;0&gt;<br>
Dec 31 12:52:48 YGOR /usr/local/sbin/kamailio[10375]:
ERROR:htable:ht_dbg: htable[1384] -- &lt;0&gt;<br>
Dec 31 12:52:48 YGOR /usr/local/sbin/kamailio[10375]:
ERROR:htable:ht_dbg: htable[1385] -- &lt;0&gt;<br>
Dec 31 12:52:48 YGOR /usr/local/sbin/kamailio[10375]:
ERROR:htable:ht_dbg: htable[1386] -- &lt;0&gt;<br>
Dec 31 12:52:48 YGOR /usr/local/sbin/kamailio[10375]:
ERROR:htable:ht_dbg: htable[1387] -- &lt;0&gt;<br>
Dec 31 12:52:48 YGOR /usr/local/sbin/kamailio[10375]:
ERROR:htable:ht_dbg: htable[1388] -- &lt;0&gt;<br>
Dec 31 12:52:48 YGOR /usr/local/sbin/kamailio[10375]:
ERROR:htable:ht_dbg: htable[1389] -- &lt;0&gt;<br>
</blockquote>
<br>
Yes, these show empty htable slots.<br>
<br>
<blockquote
 cite="mid:88b5e74c0912310302l129c01d7rb322d571652b0aa7@mail.gmail.com"
 type="cite"><br>
Do you have any idea on why htable module does not load the data in the
memory ?<br>
</blockquote>
<br>
Needs some troubleshooting as looks not to work from a certain amount
of data.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<br>
<blockquote
 cite="mid:88b5e74c0912310302l129c01d7rb322d571652b0aa7@mail.gmail.com"
 type="cite"><br>
Cheers<br>
Alex<br>
  <br>
  <br>
  <br>
  <br>
  <br>
  <br>
  <div class="gmail_quote">On Wed, Dec 30, 2009 at 6:01 PM,
Daniel-Constantin Mierla <span dir="ltr">&lt;<a moz-do-not-send="true"
 href="mailto:miconda@gmail.com">miconda@gmail.com</a>&gt;</span> wrote:<br>
  <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
    <div text="#000000" bgcolor="#ffffff">
Hello,
    <div class="im"><br>
    <br>
On 12/30/09 4:53 PM, alex pappas wrote:
    </div>
    <blockquote type="cite">Hi,<br>
      <br>
      <div class="im">I don't see where the mysql is stacking but if I
read correctly in <a moz-do-not-send="true"
 href="http://kamailio.org/docs/modules/1.5.x/htable.html"
 target="_blank">http://kamailio.org/docs/modules/1.5.x/htable.html</a>
      <br>
      <br>
      <u><i>The number of entries in the table is 2^size</i></u> :&nbsp;
2^14=16384 rows data and i have 2.000.000 rows so maybe it is not
possible to load them..But you know better of course.<br>
      </div>
    </blockquote>
no, that is the number of slots (buckets) in the hash table, not the
number of items that can be loaded -- some more technical aspects of
hash tables:<br>
    <br>
    <a moz-do-not-send="true"
 href="http://en.wikipedia.org/wiki/Hash_table" target="_blank">http://en.wikipedia.org/wiki/Hash_table</a><br>
    <br>
The number of items in htable is only a matter of shared memory. The
number of slots controls access speed -- higher number gives less
collisions.<br>
    <br>
You said at a moment that you could start, but htable was returning
only null: put a sht_print() in config to see the content of the htable
(you probably need high debug level: debug=5) with the first sip
request.<br>
    <br>
Cheers,<br>
    <font color="#888888">Daniel</font>
    <div>
    <div class="h5"><br>
    <br>
    <br>
    <blockquote type="cite"><br>
      <br>
      <br>
      <div class="gmail_quote">On Wed, Dec 30, 2009 at 5:32 PM,
Daniel-Constantin Mierla <span dir="ltr">&lt;<a moz-do-not-send="true"
 href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>&gt;</span>
wrote:<br>
      <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
        <div>Hello,<br>
        <br>
On 12/30/09 4:05 PM, alex pappas wrote:<br>
        </div>
        <div>
        <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br>
          <br>
The error I get is the following:<br>
          <br>
ERROR:db_mysql:db_mysql_submit_query: driver error on query: Lost
connection to MySQL server during query<br>
ERROR:core:db_do_query: error while submitting query<br>
ERROR:htable:ht_db_load_table: Error while querying db<br>
ERROR:core:init_mod: failed to initialize module htable<br>
ERROR:core:main: error while initializing modules<br>
          <br>
I'm running kamailio with 8M private memory per process and 2048M
&nbsp;shared memory.<br>
          <br>
When kamailio is getting the data from mysql is passing it all the data
chunk in private memory and then in the shared memory?<br>
        </blockquote>
        </div>
It is loaded in chunks of rows -- you can tune it with a module
parameter:<br>
        <a moz-do-not-send="true"
 href="http://kamailio.org/docs/modules/3.0.x/modules_k/htable.html#id2529075"
 target="_blank">http://kamailio.org/docs/modules/3.0.x/modules_k/htable.html#id2529075</a><br>
        <br>
Try to play with it to see if you get better results. You do not need
more private memory, 8MB is ok.<br>
        <br>
Maybe the mysql server is closing due to lot of loaded data. Have you
got any figure what is the number of rows when it starts losing the
connection?<br>
        <br>
Cheers,<br>
        <font color="#888888">Daniel</font>
        <div><br>
        <br>
        <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
          <br>
because if this is the case then I need more than 1000M in private
memory.<br>
          <br>
Cheers<br>
Alex<br>
          <br>
P.S. i don't get any errors from mysql.<br>
          <br>
          <br>
          <br>
        </blockquote>
        <br>
        </div>
        <div>
        <div>-- <br>
Daniel-Constantin Mierla<br>
* <a moz-do-not-send="true" href="http://www.asipto.com/"
 target="_blank">http://www.asipto.com/</a><br>
        <br>
        </div>
        </div>
      </blockquote>
      </div>
      <br>
    </blockquote>
    <br>
    <pre cols="72">-- 
Daniel-Constantin Mierla
* <a moz-do-not-send="true" href="http://www.asipto.com/"
 target="_blank">http://www.asipto.com/</a>
    </pre>
    </div>
    </div>
    </div>
  </blockquote>
  </div>
  <br>
</blockquote>
<br>
<pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
* <a class="moz-txt-link-freetext" href="http://www.asipto.com/">http://www.asipto.com/</a>
</pre>
</body>
</html>