-->
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.  [ 3 posts ] 
Author Message
 Post subject: MassIndexer memory problem
PostPosted: Wed Dec 17, 2014 7:25 am 
Newbie

Joined: Thu Oct 23, 2008 2:57 am
Posts: 1
Env : JBoss 7.1.3, JEE6 Application, Hibernate Search 4.3.0.Final

Hello,

I have problem with the mass indexer. I have got a 1->N relation (with a backward ref on the N side). When I enable that relation to be indexed, my Server runs into memory problems.

My Indexer strategy:

[code]
public void reindexData(Class<?> clazz, final FullTextEntityManager ftEm, final Logger logger) {
ftEm.createIndexer(clazz)
.batchSizeToLoadObjects(1000)
.threadsToLoadObjects(5)
.threadsForSubsequentFetching(3)
.idFetchSize(1000)
.progressMonitor(new MassIndexerProgressMonitor() {
.....
})
.start();
}
[/code]

My entity bean is :

[code]
@Entity
....
@Indexed
public class VersichertePerson extends MPEntity implements Historisierbar {

...

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@DocumentId
private Long id;

@ManyToOne
@OmitHistory
@IndexedEmbedded(depth = 1, prefix = "")
private Auftraggeber auftraggeber;

@Field(analyze = Analyze.YES, store = Store.YES, name = "nachname")
private String nachname;

@Field(analyze = Analyze.YES, store = Store.YES, name = "nachnameCode")
private String codeNachname;

@Field(analyze = Analyze.YES, store = Store.YES, name = "vorname")
private String vorname;

@Field(analyze = Analyze.YES, store = Store.YES, name = "vornameCode")
private String codeVorname;

@OneToMany(targetEntity = Auftrag.class, mappedBy = "versichertePerson")
@IndexedEmbedded(depth = 1)
private List<Auftrag> auftraege;

.... [/code]

The Auftrag class only delivers a transient attribute to be indexed:

[code]
public abstract class Auftrag extends MPEntity implements Historisierbar, Comparable<Auftrag> {
...
@Transient
@Field(analyze = Analyze.YES, store = Store.YES, name = "isAuftragOffen")
public boolean isAuftragOffen() {
switch (getBearbeitungsstatus()) {
case ...:
return true;
default:
return false;
}
}
[/code]

After indexing, I find 1GB of loitering objects in the class ProducerConsumerQueue (Hibernate Search internal).

When I disable the @IndexEmebedded on List<Auftrag> I don't have the problem.

Is there a common way to deal with such problem? I need that attribute in my index.

Or is there a way to flush the index?


Top
 Profile  
 
 Post subject: Re: MassIndexer memory problem
PostPosted: Mon Jan 05, 2015 12:27 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi,
I've never seen reports of memory leaks in the MassIndexer, so it's unlikely to be a real memory leak.
It's possible it didn't finish yet?

Could you try using the synchronous version by using the MassIndexer method "startAndWait()" ?

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


Top
 Profile  
 
 Post subject: Re: MassIndexer memory problem
PostPosted: Mon Jan 05, 2015 12:28 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Also I would suggest to update your stack. Both JBoss 7.1 and Hibernate Search 4.3 are quite old and unmaintained.

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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.