-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
 Post subject: Indexer and DataBase connections limit on Oracle XE
PostPosted: Wed Jun 08, 2011 5:36 am 
Newbie

Joined: Fri Jun 03, 2011 3:50 am
Posts: 14
Location: Ukraine
Hi,

I have one problem run indexing on Oracle XE. In case only one entity is annotated as @Indexed looks like indexing goes well. But when I try to annotate two or more entities to be indexed I'm getting very often connection error:
Code:
ERROR [Hibernate Search: collectionsloader-4] (JDBCExceptionReporter.java:101) - Listener refused the connection with the following error:
ORA-12518, TNS:listener could not hand off client connection
The Connection descriptor used by the client was:
192.168.240.89:1521:XE

ERROR [Hibernate Search: collectionsloader-4] (EntityConsumerLuceneworkProducer.java:103) - error during batch indexing:
org.hibernate.exception.GenericJDBCException: Cannot open connection

ERROR [Hibernate Search: entityloader-2] (JDBCExceptionReporter.java:101) - Listener refused the connection with the following error:
ORA-12519, TNS:no appropriate service handler found
The Connection descriptor used by the client was:
192.168.240.89:1521:XE


It looks like indexer runs new process for any annotated entity. I could't find the reason why XE refuses connections except that limit of connections is reached (strange, because I run this on just started DB).

Are there some workaround on this problem? Can indexer be run in one process?

Thanks.


Top
 Profile  
 
 Post subject: Re: Indexer and DataBase connections limit on Oracle XE
PostPosted: Wed Jun 08, 2011 5:46 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hello,
by indexer you mean the MassIndexer ?
By default it uses a high amount of threads: it's design is quite scalable so the more threads you can use, the faster it should be, but of course it will need more connections, and at some point the scalability of your database will be a limiting factor.
The amount of threads being used is affected by the number of indexed types as well.

You should either raise the number of connections limit to the database (and connection pool), or lower the number of threads being used by the MassIndexer.

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: Indexer and DataBase connections limit on Oracle XE
PostPosted: Wed Jun 08, 2011 5:58 am 
Newbie

Joined: Fri Jun 03, 2011 3:50 am
Posts: 14
Location: Ukraine
Thanks for reply.

I'm using indexer as described in documentation:

Code:
      FullTextEntityManager fullTextEntityManager = Search.getFullTextEntityManager(entityManager);
      try {
         fullTextEntityManager.createIndexer().startAndWait();
      } catch (InterruptedException e) {
         e.printStackTrace();
      }   


Is it possible to lower number of threads in my case (and how)?


Top
 Profile  
 
 Post subject: Re: Indexer and DataBase connections limit on Oracle XE
PostPosted: Wed Jun 08, 2011 6:05 am 
Newbie

Joined: Fri Jun 03, 2011 3:50 am
Posts: 14
Location: Ukraine
Ok, I increased maximum connections as described here
http://my.bergersoft.net/2010/01/06/how-to-resolve-the-oracle-max-connection-limit-exceeded-problem-on-oracle-10g-express/

and it helped. Now indexing works ok.

Thanks.


Top
 Profile  
 
 Post subject: Re: Indexer and DataBase connections limit on Oracle XE
PostPosted: Wed Jun 08, 2011 6:17 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
just lower the default number of threads:
http://docs.jboss.org/hibernate/stable/search/reference/en-US/html_single/#search-batchindex-massindexer

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: Indexer and DataBase connections limit on Oracle XE
PostPosted: Wed Jun 08, 2011 7:00 am 
Newbie

Joined: Fri Jun 03, 2011 3:50 am
Posts: 14
Location: Ukraine
Cool, thanks! :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.