• Views
  • Iteration Report
  • My Iteration Report
  •  
OMERO.server
  • Login
  • Help/Guide
  • About Trac
  • Preferences
  • Wiki
  • Timeline
  • Roadmap
  • Browse Source
  • View Tickets
  • Search

Context Navigation

  • Last Change
  • Annotate
  • Revision Log

root/trunk/etc/c3p0.properties

Revision 3045, 1.3 kB (checked in by jmoore, 2 months ago)

ticket:1114 - Fixing sql connection errors in new OmeroSessions code

This does not actually solve the issue within the new
session code which caused weblitz's DoS'ing ways to
consume all the connections. Instead, this tidies up the
c3p0 connection pooling configuration which makes connection
acquisition more robust.

Specifically, the redundant (and unused) properties in
omero.properties are gone (everything in c3p0.properties)
and some minor build changes were needed to make that
happen.

Patch from downstream: dd096cc4cc17a71e8c6f760cf6f7e72baa512ebd

Line 
1##
2## Database Connection Pooling
3##
4## See http://www.mchange.com/projects/c3p0/index.html
5## for documentation
6##
7
8#
9# Size parameters
10#
11
12# This is probably the most critical property, but
13# also the one which is most difficulty to generalize.
14# Here we have set a maxPoolSize which is suitable for
15# most systems. If, however, your postgres is configured
16# to take 100s or more connections, then increase this
17# number similarly.
18c3p0.maxPoolSize=50
19
20# Max number of prepared statements which are cached.
21# 0 disables
22c3p0.maxStatements=30
23
24#
25# Other size parameters.
26#
27c3p0.minPoolSize=5
28c3p0.initialPoolSize=10
29c3p0.acquireIncrement=5
30
31#
32# Time parameters
33#
34
35# If a connection is idle for more than this number
36# of seconds, release it.
37#
38c3p0.maxIdleTime=60
39
40# If no connection is acquired within 5 seconds
41# throw an SQLException.
42c3p0.checkoutTimeout=10000
43
44# How long a connection can be idle (secs) before
45# it is tested
46c3p0.idleConnectionTestPeriod=15
47
48
49
50#
51# Other properties which may be of use
52#
53#c3p0.maxAdministrativeTaskTime=15
54#c3p0.numHelperThreads=30
55#c3p0.maxConnectionAge=10
56#c3p0.maxIdleTimeExcessConnections=1
57#c3p0.propertyCycle=1
58#c3p0.unreturnedConnectionTimeout=15
59#c3p0.debugUnreturnedConnectionStackTraces=true
60#c3p0.maxStatementsPerConnection=5
61#c3p0.acquireRetryDelay=1000
62#c3p0.acquireRetryAttempts=60
Note: See TracBrowser for help on using the browser.

Download in other formats:

  • Original Format

Trac Powered

Powered by Trac 0.11
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.org/