#1359 closed defect (fixed)

Petascope should use a connection pool instead of a new connection for each request

Reported by: mdumitru Owned by: bphamhuu
Priority: major Milestone: 9.3
Component: petascope Version: development
Keywords: Cc: dmisev
Complexity: Medium


This affects WMS requests where you can get more than 100 requests at a time (each tile in a client like openlayers is a request) combined with the default postgresql limit of 100 connections at the same time.

The change should be trivial, there is a JDBCConnectionPool available in the apache libraries and we should use that one instead of JDBCConnection.

Change History (4)

comment:1 Changed 14 months ago by bphamhuu

  • Owner changed from mdumitru to bphamhuu
  • Status changed from new to assigned

I also think I can do it, then assign to me.

comment:2 Changed 13 months ago by bphamhuu

I used the JdbcPooledConnectionSource? instead of JdbcConnectionSource? http://ormlite.com/javadoc/ormlite-jdbc/com/j256/ormlite/jdbc/JdbcPooledConnectionSource.html

with a script test to query multiples WMS requests, it will be stopped to 100 connections as same as the JdbcConnectionSource? in few seconds.

comment:3 Changed 13 months ago by bphamhuu

  • Cc dmisev added
  • Priority changed from minor to major

The problem cannot be resolved by the JdbcPooledConnectionSource? and in general, this ticket is important because:
+ Each WMS request will occupy 3 connections to Postgresql and as I see, it takes long time to release (I think 20'). Then with some high-traffic query, just few seconds, it will go to maximum connection (i.e: in Postgresql is 100) and WMS also cannot handle requests.

+ I would think about the role of "PersistentMetadataObjectProvider?" in WMS 1.3, it works as a middle layer to add, update data in Postgresql. However, I think when WMS was initialised (i.e: data was ingested), it does not need to even touch Postgresql because all metadata can get from CoverageMetadata? for translating to Rasql query.

comment:4 Changed 12 months ago by dmisev

  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.