Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8084743
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T17:53:21+00:00 2026-06-05T17:53:21+00:00

i just got a call from Hosting company, they claimed that my application creates

  • 0

i just got a call from Hosting company, they claimed that my application creates over 400 connections to mysql database and cause their dbms to crash some how!
i am using hibernate and c3p0 as a connection pool, here is my hibernate configuration file,

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
  <session-factory>

    <property name="connection.driver_class">com.mysql.jdbc.Driver</property>
    <property name="hibernate.connection.url">
            jdbc:mysql://localhost/music?characterEncoding=UTF-8
    </property>
    <property name="connection.username">USER</property>
    <property name="connection.password">PASS</property>
    <property name="show_sql">true</property>
    <property name="dialect">org.hibernate.dialect.MySQLDialect</property>
    <property name="current_session_context_class">thread</property>
    <property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
    <property name="hbm2ddl.auto">update</property>

    <property name="hibernate.max_fetch_depth">3</property>

    <property name="hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>
    <property name="hibernate.c3p0.acquire_increment">2</property>
    <property name="hibernate.c3p0.idle_test_period">300</property>
    <property name="hibernate.c3p0.timeout">1800</property>
    <property name="hibernate.c3p0.max_size">25</property>
    <property name="hibernate.c3p0.min_size" >3</property>
    <property name="hibernate.c3p0.max_statement">0</property>
    <property name="hibernate.c3p0.preferredTestQuery">select 1;</property>
    <property name="hibernate.c3p0.testConnectionOnCheckout">true</property>
    <property name="hibernate.c3p0.validate">true</property>    

    <mapping resource="com/roodakimusic/hibernate/resources/Article.hbm.xml"/>
    <mapping resource="com/roodakimusic/hibernate/resources/News.hbm.xml"/>
    <mapping resource="com/roodakimusic/hibernate/resources/Admin.hbm.xml"/>
    <mapping resource="com/roodakimusic/hibernate/resources/Maestro.hbm.xml"/>
    <mapping resource="com/roodakimusic/hibernate/resources/Roodaki.hbm.xml"/>
    <mapping resource="com/roodakimusic/hibernate/resources/Photo.hbm.xml"/>    


  </session-factory>
</hibernate-configuration>

and any dialog between mysql and application are like this

    Session session = HibernateUtil.getSessionFactory().getCurrentSession();
    session.beginTransaction();
    //session.doSomething
    session.getTransaction().commit();

what is wrong with me ? 😀
–edit —
some say that it could be a jdbc connectors version.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T17:53:22+00:00Added an answer on June 5, 2026 at 5:53 pm

    for future! :

    SOLVED.
    the problem was in my HibernateUtil.java , this line was the problem :

    return new Configuration().configure().buildSessionFactory();

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just got done writing an Android Activity that allows other Activities to call
I'm dealing with a SOAP webservice call from a server that is expecting to
Yesterday I got a call from a Microsoft representative asking if we supply hosted
I just got burned by a bug that is partially due to my lack
I currently have a PrintingWebService that I call from an AJAX page with all
I just got a job where i would be working with MVC and they
I've got a little class that accepts a POST from a browser that contains
I've got a bunch of results from a Mechanical Turk HIT that I had
I have a URL that I need to call from a PHP script. The
Just got the new iPad, and when I touch the microphone and say a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.