<div dir="ltr"><div>ok guys, </div>
<div>I figured this out. It works beatifully now!</div>
<div>All I had to do is download (per instructions on the logback website) the c3po pooling library </div>
<div>and modify the appender&#39;s xml file to:</div>
<div>&nbsp;</div>
<div>&lt;appender name=&quot;DB&quot; class=&quot;ch.qos.logback.classic.db.DBAppender&quot;&gt;<br>&nbsp;&nbsp;&nbsp; &lt;connectionSource class=&quot;ch.qos.logback.core.db.DataSourceConnectionSource&quot;&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;dataSource class=&quot;com.mchange.v2.c3p0.ComboPooledDataSource&quot;&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;driverClass&gt;com.mysql.jdbc.Driver&lt;/driverClass&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;jdbcUrl&gt;jdbc:mysql://localhost:3306/Greg&lt;/jdbcUrl&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;user&gt;greg&lt;/user&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;password&gt;greg&lt;/password&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/dataSource&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/connectionSource&gt;<br>&nbsp; &lt;/appender&gt;</div>
<div>&nbsp;</div>
<div>In my case the database name is: Greg, password and username: greg</div>
<div>It works great and it is in fact very fast now. I just loaded it with 50,000 records without any problems whatsoever.</div>
<div>I guess&nbsp;is safe to say&nbsp; &quot;read&nbsp;the documentation first man...!&quot;&nbsp; :-)</div>
<div>Cheers,</div>
<div>Greg&nbsp;</div>
<div><br><br>&nbsp;</div>
<div class="gmail_quote">On Tue, Sep 23, 2008 at 9:38 AM, Greg Flex <span dir="ltr">&lt;<a href="mailto:greg.flex@gmail.com">greg.flex@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div dir="ltr">
<div>Ok no problem.</div>
<div>I&#39;m running the program and the database on just one computer.</div>
<div>It&#39;s all local and no one is connecting to it....</div>
<div>It&#39;s a Xeon 2.66 GHz machine with 4 cores and 3GB of ram.</div>
<div>I&#39;m running Windows XP. (the newest service pack)</div>
<div>I&#39;m looking at the Task Manager right now and I see that over 2GB&nbsp;of memory is available.</div>
<div>I just ran my program again but this time I&#39;ve reduced the Thread.sleep to just 10ms. </div>
<div>Instead of&nbsp;40,000 records just about 8,000 got written.</div>
<div>This means 10-ms is too fast and MySQL can&#39;t handle it or something.</div>
<div>I&#39;m not sure but from the documentation on line looks like&nbsp;the connection pooling is the way out...</div>
<div>I don&#39;t know and I guess I don&#39;t understand that well the notion of &quot;connection pooling&quot; so I don&#39;t know</div>
<div>how to set it up/create one.</div>
<div>Any suggestions? </div>
<div>Thanks a lot</div>
<div>Greg.</div>
<div>
<div></div>
<div class="Wj3C7c">
<div>&nbsp;</div>
<div><br><br>&nbsp;</div>
<div class="gmail_quote">On Tue, Sep 23, 2008 at 9:06 AM, Thorbjørn Ravn Andersen <span dir="ltr">&lt;<a href="mailto:ravn@runjva.com" target="_blank">ravn@runjva.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Greg Flex skrev:<br>
<div>&gt; I didn&#39;t &quot;touch&quot; the configuration of MySQL at all. I assume it&#39;s the<br>&gt; normal/standard configuration that comes with it.....<br>&gt; I ran the program again for some time last night. I wrote one log.xxx<br>
&gt; then paused the thread for about 100ms then wrote another log.xxx<br>&gt; I managed to write 39,000 logs to MySQL without any problems. It looks<br>&gt; to me then that the &quot;speed&quot; has something to do here.<br>
&gt; If writting too fast (too many records at once) to the database (both<br>&gt; MySQL and HSQLDB) they simply &quot;choke&quot;....<br>&gt; I don&#39;t know however if this is the problem; just my observations.....<br>
&gt; &nbsp;Do you think this might cause it?<br>&gt; Greg.<br></div>I am not thinking of the configuration of the database software as such<br>but of the configuration of the computer which runs the database software.<br><br>I suspect that you have less physical memory available to the database<br>
than they think they can use, hence the operating system starts swapping<br>which kills performance.<br><br>Can you please describe your setup in detail so we can replicate the<br>scenario? &nbsp;I.e. number of computers involved, connections between them,<br>
network performance, memory assigned, operating systems used, etc.<br><font color="#888888"><br>/Thorbjørn<br></font>
<div>
<div></div>
<div>_______________________________________________<br>Logback-user mailing list<br>Logback-user@qos.ch<br><a href="http://qos.ch/mailman/listinfo/logback-user" target="_blank">http://qos.ch/mailman/listinfo/logback-user</a><br>
</div></div></blockquote></div><br></div></div></div></blockquote></div><br></div>