Re: HConnectionManager leaks with zookeeper conection oo many connections from /my.tomcat.server.com - max is 60

2014-12-15 Thread Serega Sheypak
ansl > Sent: Monday, December 15, 2014 5:57 AM > Subject: Re: HConnectionManager leaks with zookeeper conection oo many > connections from /my.tomcat.server.com - max is 60 > > Hi, the problem is gone. > I did what you say :) > Thanks! > > > > 2014-12-13 22:38 GMT+03:0

Re: HConnectionManager leaks with zookeeper conection oo many connections from /my.tomcat.server.com - max is 60

2014-12-15 Thread lars hofhansl
Excellent! Should be quite a bit faster too. -- Lars From: Serega Sheypak To: user Cc: lars hofhansl Sent: Monday, December 15, 2014 5:57 AM Subject: Re: HConnectionManager leaks with zookeeper conection oo many connections from /my.tomcat.server.com - max is 60 Hi, the problem

Re: HConnectionManager leaks with zookeeper conection oo many connections from /my.tomcat.server.com - max is 60

2014-12-15 Thread Serega Sheypak
;> >> > >> > 2014-12-13 22:21 GMT+03:00 lars hofhansl : >> > > >> > > Note also that the createConnection part is somewhat expensive >> (creates a >> > > new thread pool for use with Puts, also does a ZK lookup, etc).If >> > poss

Re: HConnectionManager leaks with zookeeper conection oo many connections from /my.tomcat.server.com - max is 60

2014-12-13 Thread Serega Sheypak
ahead of time and only get/close an HTable per > > > request/thread. > > > -- Lars > > > From: Serega Sheypak > > > To: user > > > Sent: Friday, December 12, 2014 11:45 AM > > > Subject: Re: HConnectionManager leaks with zooke

Re: HConnectionManager leaks with zookeeper conection oo many connections from /my.tomcat.server.com - max is 60

2014-12-13 Thread Stack
ead of time and only get/close an HTable per > > request/thread. > > -- Lars > > From: Serega Sheypak > > To: user > > Sent: Friday, December 12, 2014 11:45 AM > > Subject: Re: HConnectionManager leaks with zookeeper conection oo many > > conne

Re: HConnectionManager leaks with zookeeper conection oo many connections from /my.tomcat.server.com - max is 60

2014-12-13 Thread Serega Sheypak
so does a ZK lookup, etc).If possible > create the connection ahead of time and only get/close an HTable per > request/thread. > -- Lars > From: Serega Sheypak > To: user > Sent: Friday, December 12, 2014 11:45 AM > Subject: Re: HConnectionManager leaks with zookee

Re: HConnectionManager leaks with zookeeper conection oo many connections from /my.tomcat.server.com - max is 60

2014-12-13 Thread lars hofhansl
, December 12, 2014 11:45 AM Subject: Re: HConnectionManager leaks with zookeeper conection oo many connections from /my.tomcat.server.com - max is 60 i have 10K doPost/doGet requests per second. Servlet is NOT single-threaded. each doPost/doGet invokes these lines (encapsulated in DAO): 16

Re: HConnectionManager leaks with zookeeper conection oo many connections from /my.tomcat.server.com - max is 60

2014-12-13 Thread Serega Sheypak
Hm... confusing, So here is the code path: 1. Servlet has doPost method 2. HistoryController instantiated during each doPost request. HistoryController is Logic wrapper around low-level HBase persistence stuff Each doPost invokes: final HistoryController getHistoryController(){ return new His

Re: HConnectionManager leaks with zookeeper conection oo many connections from /my.tomcat.server.com - max is 60

2014-12-12 Thread Stack
On Fri, Dec 12, 2014 at 11:45 AM, Serega Sheypak wrote: > > i have 10K doPost/doGet requests per second. > How many concurrent threads going on in your tomcat? Is the Connection shared amongst all threads? Perhaps you have > 60 concurrent connections running at a time and each Connection has it

Re: HConnectionManager leaks with zookeeper conection oo many connections from /my.tomcat.server.com - max is 60

2014-12-12 Thread Serega Sheypak
i have 10K doPost/doGet requests per second. Servlet is NOT single-threaded. each doPost/doGet invokes these lines (encapsulated in DAO): 16 HConnection connection = HConnectionManager.createConnection(config); 17 HTableInterface table = connection.getTable(TableName.valueOf("table1"

Re: HConnectionManager leaks with zookeeper conection oo many connections from /my.tomcat.server.com - max is 60

2014-12-12 Thread Stack
I cannot reproduce. I stood up a cdh5.2 server and then copy/pasted your code adding in a put for each cycle. I ran loop 1000 times and no complaint from zk. Tell me more (Is servlet doing single-threaded model? A single Configuration is being used or new ones are being created per servlet invoc

Re: HConnectionManager leaks with zookeeper conection oo many connections from /my.tomcat.server.com - max is 60

2014-12-12 Thread Serega Sheypak
Hi, I'm using CDH 5.2, 0.98 I don't know how to use it correctly. I've just used this sample: https://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/HConnectionManager.html HConnection connection = HConnectionManager.createConnection(config); HTableInterface table = connection.getTable(

Re: HConnectionManager leaks with zookeeper conection oo many connections from /my.tomcat.server.com - max is 60

2014-12-12 Thread Stack
Does zk count go up on each request to the servlet? Which version of hbase so can try on this end? Do you have some client-side log? Better if you cache the connection rather than make it each time since setup is costly but lets fix first problem first. St.Ack On Fri, Dec 12, 2014 at 2:47 AM, Ser

HConnectionManager leaks with zookeeper conection oo many connections from /my.tomcat.server.com - max is 60

2014-12-12 Thread Serega Sheypak
Hi, I'm using HConnectionManager from java servlet Looks like it's leaking, all my zookeepers complains that there is too many connections from servlet hosts. Typical line from lZK log: oo many connections from /my.tomcat.server.com - max is 60 Here is code sample public class BaseConnection {