-->
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.  [ 4 posts ] 
Author Message
 Post subject: Hibernate starting too many threads
PostPosted: Thu Aug 05, 2004 5:40 pm 
Newbie

Joined: Thu Aug 05, 2004 5:29 pm
Posts: 3
Hi. I've been having a problem with Hibernate when running my application in Linux. This application is supposed to stay running in the background all the time.
The problem is that, for some reason, the amount of threads created by Hibernate seems to go out of control, up to the point of crashing.
Each thread ends up spawning a new process in Linux, and there is a limit on the amount of processes it can start.
I would like to know what kind of situation would cause this sort of problem. I am pretty sure I am closing all my sessions, and committing my transactions.
I always use the same SessionFactory object, which is initialized when the application is started up.
Can someone please help me out?

Thanks in advance.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 05, 2004 5:52 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
What part of the red message wasn't clear?

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 05, 2004 6:08 pm 
Newbie

Joined: Thu Aug 05, 2004 5:29 pm
Posts: 3
I am sorry, I forgot to tell about the version. I am using hibernate 2.1.2.
This error is too general to post all the details about my code in it.
I have many places where hibernate is used, posting everything would take way too much space.
I wanted to know if anyone else had this problem, or if there is something critical that is mandatory to be done in order to prevent the spawning of so many threads.
The error takes a while (more than a full day) to appear, but as my hibernate calls get executed, the process count begins to go up. Those threads simply stay there and don't get killed.
I know hibernate states to be very scalable and implements a very high-concurrency architecture.
I would at least like to know what is considered to be a normal amount of threads for Hibernate to be using, in a non-stop application.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 05, 2004 6:26 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Hibernate never creates any threads. Some second-level cache implementations do, so try disabling the second-level cache and if you still get the problem, it is nothing to do with Hibernate.


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