<div dir="ltr">Sounds like the connections are pooled but never getting closed/reused. If you find a way to better manage their lifecycle, this problem will go away.<div><br></div><div>Luc</div></div><div class="gmail_extra">

<br><br><div class="gmail_quote">On Wed, Oct 2, 2013 at 3:18 AM, Benedikt Kämpgen <span dir="ltr">&lt;<a href="mailto:benedikt.kaempgen@kit.edu" target="_blank">benedikt.kaempgen@kit.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi Michele,<br>
<br>
Thanks a lot for your quick answer.<br>
<br>
I guess, eventually, xmlaserver needs a sustainable solution, here. For<br>
now, it would be very nice, if you give me the code so I can implement<br>
that workaround in my system, also.<br>
<br>
Best,<br>
<br>
Benedikt<br>
<br>
On 10/01/2013 11:39 PM, Michele Rossi wrote:<br>
&gt; Hi guys,<br>
&gt; yeah you are running into the problem I described back in June, the code as it is now is broken.<br>
&gt; Unfortunately at the moment I don&#39;t have any time to spare for this but my solution was basically a map of connection wrappers that held the connection and the time stamp of its last use. Then a &#39;reaper&#39; thread cleaning idle connections.<br>


&gt;<br>
&gt; No commons-pool as I could never get it to work.<br>
&gt;<br>
&gt; hope this helps. I still have the code somewhere, give me a shout if you want it.<br>
<div class="im HOEnZb">&gt;<br>
&gt; Michele<br>
&gt;<br>
&gt; Sent from my iPhone<br>
&gt;<br>
</div><div class="HOEnZb"><div class="h5">&gt;&gt; On 1 Oct 2013, at 22:27, Benedikt Kämpgen &lt;<a href="mailto:benedikt.kaempgen@kit.edu">benedikt.kaempgen@kit.edu</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Hello,<br>
&gt;&gt;<br>
&gt;&gt; In our system using xmlaserver [2] with an olap4j driver we now run into connection pooling problems.<br>
&gt;&gt;<br>
&gt;&gt; After some (sometimes more, sometimes fewer) xmla requests, any new request would hang in &quot;Daemon Thread [http-8080-2]&quot; at:<br>
&gt;&gt;<br>
&gt;&gt; --------------------------<br>
&gt;&gt; Object.wait (long) line: not available [native method]<br>
&gt;&gt; GenericObjectPool$Latch(Object).wait()<br>
&gt;&gt; GenericObjectPool.borrowObject()<br>
&gt;&gt; ...<br>
&gt;&gt; BasicDataSource.getConnection()<br>
&gt;&gt; Olap4jPoolingConnectionFactory.getConnection()<br>
&gt;&gt; ...<br>
&gt;&gt; --------------------------<br>
&gt;&gt;<br>
&gt;&gt; We use un-authenticated connections.<br>
&gt;&gt;<br>
&gt;&gt; It may be related to the problem Michele mentioned in the last mail. Another possibility would be that our olap4j driver [1] does not fulfill all requirements xmlaserver puts on olap4j drivers.<br>
&gt;&gt;<br>
&gt;&gt; Any ideas how we can solve this problem are greaty appreciated.<br>
&gt;&gt;<br>
&gt;&gt; Best,<br>
&gt;&gt;<br>
&gt;&gt; Benedikt<br>
&gt;&gt;<br>
&gt;&gt; [1] &lt;<a href="http://olap4ld.googlecode.com/" target="_blank">http://olap4ld.googlecode.com/</a>&gt;<br>
&gt;&gt; [2] &lt;<a href="https://github.com/olap4j/olap4j-xmlaserver" target="_blank">https://github.com/olap4j/olap4j-xmlaserver</a>&gt;<br>
&gt;&gt;<br>
&gt;&gt;&gt; On 06/10/2013 05:01 PM, Michele Rossi wrote:<br>
&gt;&gt;&gt; hi Luc,<br>
&gt;&gt;&gt; sure, a couple of years ago I did part of the work to have the XMLA<br>
&gt;&gt;&gt; Servlet use any Olap4j driver (attached an example web.xml) and I also<br>
&gt;&gt;&gt; did some work with Julian on the connection pooling.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Julian decided that we should use commons-pool to handle the pool of<br>
&gt;&gt;&gt; OlapConnection objects.<br>
&gt;&gt;&gt; I initially opted for a much simpler solution which I committed but<br>
&gt;&gt;&gt; later Julian decided to change it back to the commons-pool stuff.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I found that when the size of the pool reaches the maximum number of<br>
&gt;&gt;&gt; connections configured the thread that attempts to obtain the connection<br>
&gt;&gt;&gt; freezes waiting to obtain a new connection from the pool.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I also found that the connection pool didn&#39;t really re-use any existing<br>
&gt;&gt;&gt; connections preferring instead to create new ones for each requests<br>
&gt;&gt;&gt; (until the situation described above occured).<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; At the time it didn&#39;t seem like there was a huge amount of interest on<br>
&gt;&gt;&gt; the XMLA servlet and because I never got any other feedback about it I<br>
&gt;&gt;&gt; didn&#39;t attempt to have my changes committed to trunk again.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I am happy to share that code with the community again if you want.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; That said, I have not seen the mondrian / xmlaservlet code for a while,<br>
&gt;&gt;&gt; maybe someone has changed things again in the meantime.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Hope this helps.<br>
&gt;&gt;&gt; Michele<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On 10 June 2013 16:11, Luc Boudreau &lt;<a href="mailto:lucboudreau@gmail.com">lucboudreau@gmail.com</a><br>
&gt;&gt;&gt; &lt;mailto:<a href="mailto:lucboudreau@gmail.com">lucboudreau@gmail.com</a>&gt;&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;     On Thu, Jun 6, 2013 at 5:45 PM, Michele Rossi<br>
&gt;&gt;&gt;     &lt;<a href="mailto:m.rossi@iontrading.com">m.rossi@iontrading.com</a> &lt;mailto:<a href="mailto:m.rossi@iontrading.com">m.rossi@iontrading.com</a>&gt;&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;         the connection pooling code that is in there now (based on<br>
&gt;&gt;&gt;         commons-pool) is totally broken, your XMLA client (Excel 2007?)<br>
&gt;&gt;&gt;         could get stuck forever waiting to obtain a new OlapConnection<br>
&gt;&gt;&gt;         connection object<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;     Michele,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;     Can you clarify this statement? That is worrying me a little.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;     Luc<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;     _______________________________________________<br>
&gt;&gt;&gt;     Mondrian mailing list<br>
&gt;&gt;&gt;     <a href="mailto:Mondrian@pentaho.org">Mondrian@pentaho.org</a> &lt;mailto:<a href="mailto:Mondrian@pentaho.org">Mondrian@pentaho.org</a>&gt;<br>
&gt;&gt;&gt;     <a href="http://lists.pentaho.org/mailman/listinfo/mondrian" target="_blank">http://lists.pentaho.org/mailman/listinfo/mondrian</a><br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; AIFB, Karlsruhe Institute of Technology (KIT)<br>
&gt;&gt; Phone: <a href="tel:%2B49%20%28721%29%20608%2048941" value="+4972160848941">+49 (721) 608 48941</a><br>
&gt;&gt; Email: <a href="mailto:benedikt.kaempgen@kit.edu">benedikt.kaempgen@kit.edu</a><br>
&gt;&gt; Web: <a href="http://www.aifb.kit.edu/web/Hauptseite/en" target="_blank">http://www.aifb.kit.edu/web/Hauptseite/en</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
<br>
--<br>
AIFB, Karlsruhe Institute of Technology (KIT)<br>
Phone: <a href="tel:%2B49%20%28721%29%20608%2048941" value="+4972160848941">+49 (721) 608 48941</a><br>
Email: <a href="mailto:benedikt.kaempgen@kit.edu">benedikt.kaempgen@kit.edu</a><br>
Web: <a href="http://www.aifb.kit.edu/web/Hauptseite/en" target="_blank">http://www.aifb.kit.edu/web/Hauptseite/en</a><br>
<br>
<br>
<br>
------------------------------------------------------------------------------<br>
October Webinars: Code for Performance<br>
Free Intel webinars can help you accelerate application performance.<br>
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from<br>
the latest Intel processors and coprocessors. See abstracts and register &gt;<br>
<a href="http://pubads.g.doubleclick.net/gampad/clk?id=60134791&amp;iu=/4140/ostg.clktrk" target="_blank">http://pubads.g.doubleclick.net/gampad/clk?id=60134791&amp;iu=/4140/ostg.clktrk</a><br>
_______________________________________________<br>
olap4j-devel mailing list<br>
<a href="mailto:olap4j-devel@lists.sourceforge.net">olap4j-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/olap4j-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/olap4j-devel</a><br>
</div></div></blockquote></div><br></div>