<div dir="ltr"><div>Hi,</div>
<div>Thanks.</div>
<div>when i changed to myisam engine (after reading a little) the error stoped even on a very high number of CAPS.</div>
<div>i will try to use the db_insert_mode = 1 to increase the speed of the transaction.</div>
<div>BR,</div>
<div>Uri</div>
<div> </div>
<div><br>Hi<br><br>I&#39;ve also seen this error<br>&quot;ERROR: acc [acc.c:405]: failed to insert into database &quot;.<br><br>This seem to happen when cdrs_procedure runs at the same time of acc table insert. Can also be reliably reproduced by locking the acc table, make a call (about 20 seconds or more), end the call, wait for a short while, unlock acc table. This causes this error, and Kamailio inserts duplicated INIVTE / BYE entries into acc table. The number of duplicated entries depends on how long you&#39;ve locked the table for. So I think this acc insert error may have been to do with table locking when cdrs_procedure is run.<br>
<br>When there are duplicated entries in acc table, cdrs_procedure takes the first INVITE/BYE entires and updated the cdrs table correctly. But threw an error when it hits the next duplicated entry and stop. So for us it didn&#39;t seem to cause any trouble for cdrs records so I didn&#39;t chase it further. But would be nice if we could stop/handle the duplicated entries some how.<br>
<br>Not a fix at at all, just some clues that might help.<br><br>Yufei<br><br><br><br></div>
<div class="gmail_quote">On Wed, Mar 21, 2012 at 8:28 PM, Uri Shacked <span dir="ltr">&lt;<a href="mailto:ushacked@gmail.com">ushacked@gmail.com</a>&gt;</span> wrote:<br>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">
<div dir="ltr">
<div>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt" class="MsoNormal"><span style="FONT-FAMILY:&#39;Times New Roman&#39;,&#39;serif&#39;;FONT-SIZE:12pt">Well, after some experiments...</span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt" class="MsoNormal"><span style="FONT-FAMILY:&#39;Times New Roman&#39;,&#39;serif&#39;;FONT-SIZE:12pt">Two things made the difference:</span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt" class="MsoNormal"><span style="FONT-FAMILY:&#39;Times New Roman&#39;,&#39;serif&#39;;FONT-SIZE:12pt">1. Use only the id as Pkey and remove all other indexes (helped a little).</span></p>

<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt" class="MsoNormal"><span style="FONT-FAMILY:&#39;Times New Roman&#39;,&#39;serif&#39;;FONT-SIZE:12pt">2. Set myisam engine to the table (i knew that but tried innodb for its reliability)</span></p>

<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt" class="MsoNormal"><span style="FONT-FAMILY:&#39;Times New Roman&#39;,&#39;serif&#39;;FONT-SIZE:12pt">Now we are back in order to deal with many, many CAPS.</span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt" class="MsoNormal"><span style="FONT-FAMILY:&#39;Times New Roman&#39;,&#39;serif&#39;;FONT-SIZE:12pt">Thanks,</span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt" class="MsoNormal"><span style="FONT-FAMILY:&#39;Times New Roman&#39;,&#39;serif&#39;;FONT-SIZE:12pt"> </span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt" class="MsoNormal"><span style="FONT-FAMILY:&#39;Times New Roman&#39;,&#39;serif&#39;;FONT-SIZE:12pt">If someone has another idea, and uses innodb for the ACC. please advise...</span></p>

<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt" class="MsoNormal"><span style="FONT-FAMILY:&#39;Times New Roman&#39;,&#39;serif&#39;;FONT-SIZE:12pt"> </span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt" class="MsoNormal"><span style="FONT-FAMILY:&#39;Times New Roman&#39;,&#39;serif&#39;;FONT-SIZE:12pt">BR,</span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 12pt" class="MsoNormal"><span style="FONT-FAMILY:&#39;Times New Roman&#39;,&#39;serif&#39;;FONT-SIZE:12pt">Uri</span></p></div>
<div>
<div class="h5">
<div class="gmail_quote">On Tue, Mar 20, 2012 at 12:22 PM, Uri Shacked <span dir="ltr">&lt;<a href="mailto:ushacked@gmail.com" target="_blank">ushacked@gmail.com</a>&gt;</span> wrote:<br>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">
<div dir="ltr">
<div>no log on the msqld for it.</div>
<div>there is the CDR server that collects the events every 5 min and deletes old once... i disabled it becoase i believed it was it.  but, no.... the error apears again...</div>
<div>a BI specialist told me it must have something to do with the number of columns and the data type...<br><br></div>
<div>
<div>
<div class="gmail_quote">On Tue, Mar 20, 2012 at 12:06 PM, Daniel-Constantin Mierla <span dir="ltr">&lt;<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>&gt;</span> wrote:<br>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">
<div bgcolor="#FFFFFF" text="#000000">Do you have error messages in mysql server logs? Is there another application that may block the acc table?<br><br>The error refers to unavailability of the mysql server...<br><br>Cheers,<br>
Daniel 
<div>
<div><br><br>On 3/20/12 11:03 AM, Uri Shacked wrote: 
<blockquote type="cite">
<div dir="ltr">
<div>ERROR: db_mysql [km_dbase.c:122]: driver error on query: Lost connection to MySQL server during query<br>Mar 18 20:03:38 net-ivr-KamIN-J1 /usr/local/sbin/kamailio[2671]: ERROR: &lt;core&gt; [db_query.c:186]: error while submitting query<br>
Mar 18 20:03:38 net-ivr-KamIN-J1 /usr/local/sbin/kamailio[2671]: ERROR: acc [acc.c:405]: failed to insert into database</div>
<div> </div>
<div>Whe apears, from time to time, for some of them. it can rest for 2-10 hours, then have a &quot;glitch&quot; of 160 sql driver errors, and rest again....</div>
<div> </div>
<div><br> </div>
<div class="gmail_quote">On Tue, Mar 20, 2012 at 11:51 AM, Daniel-Constantin Mierla <span dir="ltr">&lt;<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>&gt;</span> wrote:<br>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">
<div bgcolor="#FFFFFF" text="#000000">Hello, 
<div><br><br>On 3/20/12 10:11 AM, Uri Shacked wrote: 
<blockquote type="cite">
<div dir="ltr">
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt" class="MsoNormal"><span>Hi,</span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt" class="MsoNormal"><span> </span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 6pt" class="MsoNormal"><span>I am using the ACCDB with extra data. I collect the data to AVP&#39;s and set it on the db_extra. It gets to be 37 columns…. Pretty long…</span></p>

<div style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 6pt" class="MsoNormal"><span>The problem I experience is that after a while (2-3 hours) with about 15 CAPS the MySQL ACC insert error appears. </span></div>
<div style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 6pt" class="MsoNormal"><span>And, I am loosing accounting data.</span></div></div></blockquote></div>what are the errors? Once they appear, is it for all records or just from time to time, to some of them?<br>
<br>Cheers,<br>Daniel<br><br>
<blockquote type="cite">
<div>
<div dir="ltr">
<div style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 6pt" class="MsoNormal"><span> </span></div>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 6pt" class="MsoNormal"><span>Except of narrowing the amount of columns and setting the fields (INT,CHAR etc.), does anyone has any ideas?</span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 6pt" class="MsoNormal"><span> </span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 6pt" class="MsoNormal"><span>The db_insert_mode set to 1 does not work (my ACC table is INNODB because I don’t want to lose info).</span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 6pt" class="MsoNormal"><span> </span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 6pt" class="MsoNormal"><span>BR,</span></p>
<p style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 6pt" class="MsoNormal"><span>Uri</span></p></div><br>
<fieldset></fieldset> <br></div><pre>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><span><font color="#888888">
</font></span></pre><span></span></blockquote><span><font color="#888888"><br><pre cols="72">-- 
Daniel-Constantin Mierla
Kamailio Advanced Training, April 23-26, 2012, Berlin, Germany
<a href="http://www.asipto.com/index.php/kamailio-advanced-training/" target="_blank">http://www.asipto.com/index.php/kamailio-advanced-training/</a></pre></font></span></div></blockquote></div><br></div></blockquote><br>
<pre cols="72">-- 
Daniel-Constantin Mierla
Kamailio Advanced Training, April 23-26, 2012, Berlin, Germany
<a href="http://www.asipto.com/index.php/kamailio-advanced-training/" target="_blank">http://www.asipto.com/index.php/kamailio-advanced-training/</a></pre></div></div></div></blockquote></div><br></div></div></div></blockquote>
</div><br></div></div></div></blockquote></div><br></div>