Successfully!

Error!

You are viewing 10.0 help doc. More details are displayed in the latest help doc

Data Connection Advanced Settings

I. Overview

1. version

Report server versionFunction changes
10.0.18
  • The "Connection Pool Atrributes" button is renamed to "Advanced Settings"

  • Part of the designer data connection supports setting fetchsize

10.0.19Decision-making platform adaptation fetchsize configuration


2. Function introduction

This article will introduce the advanced setting method and the meaning of each parameter in its properties.

  • connection pool

  • fetchsize

II. Specific introduction

1. Advanced settings

Click Server>Define Data Connection in FineReport Designer, select a data connection, and click Advanced Settings to set connection pool attributes, and some data connections can also set fetchsize. As shown below:

1.png

2.png


2. Introduction to connection pool attribute parameters

The description of each parameter of the connection pool attribute is shown in the following table:

NameExampleMeaning
Initialize ConnectionsinitialSize="1"Number of initial connections created when the connection pool is started
Maximum Acitive ConnectionsinitialSize="1"The maximum number of active connections that the connection pool can allocate at the same time, if it is set to a non-positive number, it means no limit
Maximum Idle ConnectionsmaxIdle="100"Note: This parameter is obsolete
Minimum Idle ConnectionsminIdle="2"The minimum number of connections that are allowed to remain idle in the connection pool. New connections will be created below this number. If set to 0, no connections will be created.
Maximum Waiting Time(ms)maxWait="1000"When there is no available connection, the maximum time (counted in milliseconds) for the connection pool to wait for the connection to be returned. If the time is exceeded, an exception will be thrown. If set to -1, it means infinite waiting
SQL Validation QueryvalidationQuery="SQL语句"It is used to validate the connection taken from the connection pool. If specified before returning the connection to the caller, the query must be a SQL SELECT and must return at least one row of records.
Test before Getting ConnectionstestOnBorrow="false"Indicate whether to check before removing the connection from the pool, if the check fails, remove the connection from the pool and try to remove another.
Test before Returning ConnectionstestOnReturn="true"Indicate whether to inspect before returning to the pool
Open Idle Connection Recyclers TesttestWhileIdle="true"Indicate whether the connection is checked by the idle connection collector (if any), if the check fails, the connection will be removed from the pool.
Sleep Time of Idle Connections Recyclers(ms)

timeBetweenEvictionRunsMilli

s="1000

The sleep time value during the running of the idle connection collector thread, in milliseconds. If set to a non-positive number, the idle connection collector thread will not run.
Recycled and Tested Idle ConnectionsnumTestsPerEvictionRun="2"The number of connections checked each time the idle connection collector thread (if any) runs
Keep Minimum Idle Time Value(s)

minEvictableIdleTimeMilli

s="18005000"

The minimum time value for the connection to remain idle in the pool without being reclaimed by the idle connection collector thread (if any).

The maximum number of active connections is set to exceed the number of connections in the database. It can only be based on the number of connections in the database. If you want to adjust it to the maximum, you must also adjust the number of connections in the database. Refer to the solution in the document Connection Pool Full Problem.


3. fetchsize setting

When executing a SQL query statement, you need to open a cursor on both the client and the server, and apply for a memory space respectively as a buffer for storing the query data. How many pieces of data are stored in this memory area is determined by fetchsize.

Users can set fetchsize for "Oracle, DB2, Postgre" data connection in FineReport. You can enter any value from 1 to 1,000,000. If it is blank, it means that this parameter is not configured.

Note: In 10.0.19, the decision-making platform adds the setting item of fetchsize. When configuring fetchsize remotely, the designer used must be version 10.0.18 or higher, otherwise the fetchsize setting item in the platform will disappear if the save is triggered in the designer.

3.png

III. Matters needing attention

If when accessing the template, the connection timeout and waiting status are reported, and the warning is as follows:

Warning: Cannot get a connection, pool error Timeout waiting for idle object
at com.fr.third.org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:114)
at com.fr.third.org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
at com.fr.data.pool.MemoryConnection.create(Unknown Source)
at com.fr.data.impl.JDBCDatabaseConnection.createConnection(Unknown Source)

You need to increase the corresponding number of connections.


Attachment List


Theme: Data Preparation
Already the First
Already the Last
  • Helpful
  • Not helpful
  • Only read

Doc Feedback