Issue Type: Bug Bug
Affects Versions: current
Assignee: Unassigned
Components: audit2db
Created: 18/Dec/13 8:15 AM
Description:

Hibernate plugin connections create 2 connection per database update but never removes them.

Hibernate session is not close.

Hibernate configuration:

<property name="c3p0.max_size">10</property>
        <property name="c3p0.min_size">2</property>
        <property name="c3p0.timeout">1800</property>
        <property name="c3p0.max_statements">50</property>
        <property name="connection.autocommit">true</property>

The problem is that max connections overrides defined value in hibernate (10) I have 12 (If I continue I have 2 connection for each register Job...). Every new Job registered with Audit2db retrieves 2 new connections.

$ echo "SHOW PROCESSLIST" | mysql --user=jenkins --password=jenkins
Id	User	Host	db	Command	Time	State	Info
109	jenkins	localhost:48405	jenkinsdb	Sleep	299		NULL
110	jenkins	localhost:48407	jenkinsdb	Sleep	1014		NULL
111	jenkins	localhost:48408	jenkinsdb	Sleep	1014		NULL
114	jenkins	localhost:48409	jenkinsdb	Sleep	241		NULL
117	jenkins	localhost:48422	jenkinsdb	Sleep	235		NULL
118	jenkins	localhost:48421	jenkinsdb	Sleep	2247		NULL
131	jenkins	localhost:48438	jenkinsdb	Sleep	1921		NULL
132	jenkins	localhost:48437	jenkinsdb	Sleep	1921		NULL
133	jenkins	localhost:48440	jenkinsdb	Sleep	1914		NULL
134	jenkins	localhost:48441	jenkinsdb	Sleep	1917		NULL
152	jenkins	localhost:48459	jenkinsdb	Sleep	231		NULL
153	jenkins	localhost:48460	jenkinsdb	Sleep	231		NULL
157	jenkins	localhost:48461	jenkinsdb	Sleep	78		NULL
158	jenkins	localhost:48462	jenkinsdb	Sleep	53		NULL
159	jenkins	localhost	NULL	Query	0	NULL	SHOW PROCESSLIST

The value representig timeout 1800 (secs) doesn't remove sleep connections.

I think there is another value like `idle_test_period` that hast to be set (if I've understood the meaning) to remove idle connections.

Or the problem is that hibernate connections have never been closed

Thanks!

Environment: Ubuntu 13.10, jdk1.7.0_40, Mysql5.5
Project: Jenkins
Labels: plugin jenkins database hibernate
Priority: Major Major
Reporter: Ricardo García Fernández
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to