Dear wizards,
I have th e following problem with Hibernate 3.2 + MySQL 5.0:
I am developing a client-server application where a server needs to serve hundreds of clients simultaneously. The server is based on Spring, Hibernate and MySQL.
I am running some stress tests where I simulate a number of clients that connect to the database and do some basic queries and updates. This works fine for up to 27 clients, but with 30 clients, performance drops to a
tenth. It seems like I'm running into some kind of defined concurrency limit, but I just can't figure out where this limit is set.
My MySQL server allows up to 100 simultaneous connections.
My hibernate is configured with c3p0 as follows:
Code:
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">
<property name="driverClass" value="com.mysql.jdbc.Driver"/>
<property name="jdbcUrl" value="jdbc:mysql://127.0.0.1/myapp"/>
<property name="user" value="myuser"/>
<property name="password" value=""/>
<property name="acquireIncrement" value="5" />
<property name="initialPoolSize" value="50" />
<property name="maxPoolSize" value="100" />
<property name="minPoolSize" value="50" />
<property name="maxIdleTime" value="3600" />
</bean>
<bean id="sessionFactoryBase" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean" abstract="true">
<property name="dataSource" ref="dataSource" />
<property name="hibernateProperties">
<value>
hibernate.dialect=org.hibernate.dialect.MySQLDialect
hibernate.show_sql=false
hibernate.format_sql=true
</value>
</property>
</bean>
Does anyone have the slightest idea what's going on?