Working parameters
The platform working parameters can be set in one of the following ways (in the order of their priorities, lower priority at the bottom):
- In Java code in the
lsfusion.server.physics.admin.Settings.java
file (relevant for platform forks) - In
lsfusion.properties
which are typically part of the project and therefore function for all installations by default - parameter name should start withsettings
(e.g., settings.enableUI) - In
conf/settings.properties
(for specific installations) - parameter name should start withsettings
- In Java startup parameters - parameter name should start with
D
prefix plussettings
(e.g.,-Dsettings.enableUI=2
) - In the database:
Administration > System > Settings > Parameters
. In this interface, you can set both global settings and settings for specific roles - During the execution of an action using system actions:
Service.pushSetting[STRING, STRING]
,Service.popSetting[STRING]
(overriding the value of the property for the entire current thread).
Parameter Type | Description | Default | |
---|---|---|---|
enableUI | int | Determines user interface access, including form api2 - Allow anonymous access1 - Allow authenticated access only0 - Do not allow access | 1 (2 - if the server is started in development mode) |
enableAPI | int | Determines access to the program interface excluding form api2 - Allow anonymous access1 - Allow authenticated access only0 - Do not allow access | 1 (2 - if the server is started in development mode) |
freeConnections | int | Maximum number of connections in the connection pool on the application server | 12 |
statDegree | int | The base used to estimate the number of records (statistics) by all optimizers. With that, optimizers consider any number of records equal to the specified base to a certain degree (for example, if the number of records is really 1000 and the base is 5 , then the optimizer considers the number of records equal to 5 to the 4 th degree). Thus, the larger the base, the less accurate the statistics become, which means the compilation time, the size of the caches and generated requests are reduced, but this can significantly increase the likelihood of errors when building the correct query plan. | 5 |
authTokenExpiration | int | Authentication token expiration time in minutes. | 60*24 (1 day) |
reserveIDStep | int | The number of IDs that the application server immediately reserves for optimization when performing single object adding operations (with asynchronous input, single NEW , etc.) | 50 |
excessThreadAllocatedBytes , accessInterruptCount | long , int | Determine the threshold and the number of iterations of memory measurement during which this threshold is exceeded after which the Java thread will be automatically interrupted. This mechanism is typically used to increase the fault tolerance of the application server. | 5GB , 4 |
queryLengthTimeout | int | Parameters of the query materialization mechanism. queryLengthTimeout defines the minimum query length for which the mechanism is enabled | 1000 |
useRequestTimeout | boolean | Enables the mechanism for repeated remote calls if these calls take too long. It is necessary for resolving situations when a call is made on the server, but the response is lost due to network problems. The latter usually happens when the application server is running in a virtualized environment. Thus, in this case, it is recommended to enable this setting and disable it in the opposite case. | true |
tempTablesTimeThreshold , tempTablesCountThreshold | int , int | Determine the minimum lifespan threshold (in seconds) of a temporary table and the number of tables per connection, upon exceeding which these temporary tables are cleared/deleted in the routine mode. The minimum lifespan threshold for the table should be commensurate with the standard using time of the temporary table. The smaller these thresholds, the lower the resource consumption by the database server, but the higher the likelihood of "cache rotation" | 240 , 40 |
queryRowCountPessLimit , queryRowCountOptDivider | int , int | Parameters of the protection mechanism against too large queries. queryRowCountPessLimit - minimum number of records for which this protection is activated, queryRowCountOptDivider - the threshold at which the application server throws an error (is set as part of all memory available for the application server, e.g., if the parameter value is 50 and the memory capacity is 100GB , then the threshold is 100GB/50=2GB ). | 1000 , 50 |
queryLengthLimit | int | Parameters of the protection mechanism against too long queries. queryLengthLimit - the length of the request upon exceeding which the application server throws an error. | 2000000 |
remoteLogTime | int | Runtime threshold (in milliseconds) at which the remote call is written to the corresponding log (server-remote) | 3000 |
explainThreshold , explainJavaStack , explainCompile | int , boolean , boolean | Output parameters of query execution plan logs
| 100 , false , false |
startServerAnyWay | boolean | Start the server, even if there are errors in the index structure or metadata synchronization | false |
conflictSleepThreshold , conflictSleepTimeDegree | int , int | Parameters for resolving repeated update conflicts:
| 3 , 2 |
timeoutNanosPerRow | int | The average number of nanoseconds to process one row (is used to estimate the approximate time of the request execution). If this estimated time is exceeded, the platform tries to materialize some subqueries (or somehow change this request to a more pessimistic one) and run the query again. Reducing this parameter value may lead to more frequent materializations and additional repeated executions of the query in general, increasing it may lead to the use of incorrect plans (in the first place, nested loops on joining large tables), for example, in cases when the SQL server evaluates the subquery statistics incorrectly. | 20 |
deadLockThreshold | int | Parameters for resolving repeated deadlocks. deadLockThreshold - the number of unsuccessful attempts (when a deadlock occurred) after which the mechanism should be enabled. | 0 |
periodRestartConnections , percentRestartConnections | int , int | Parameters of the connection restarting mechanism. periodRestartConnections - determines how often (a period in seconds) this mechanism is launched. percentRestartConnections - determines the percentage of connections with the maximum scoring that will be restarted. | 60 , 1 |
closeFormDelay | int | The period provided to the client to finish processing the form after initiating its closure on the server (this mechanism is necessary for saving a round trip request when closing the form). | 5000 |
constraintRowsLimit | int | Determines the number of rows that should be displayed within a constraint violation message | 30 |
defaultCompareForStringContains | boolean | Use Contains as the default filter in custom filters | false |
limitHintIncrementComplexity , limitComplexityGrowthCoeff , limitHintIncrementStat , limitHintIncrementValueComplexity , limitApplyHintIncrementComplexity , limitApplyHintIncrementStat | int , double , int , int , int , int | Parameters for managing the complexity of changes (materialization of property changes when the complexity of incremental calculations becomes too large):
| 50 , 1.5 , 200 , 1000 , 100 , 1000 |
excessThreadAllocatedBytes , excessInterruptCount , threadAllocatedMemoryPeriod | long , int , int | Parameters of the excessive memory consumption preventing mechanism on the application server:
| 5368709120L (5GB), 4 , 180 (3 minutes) |
useSavePointsThreshold , savePointCountForExceptions , updateSavePointsMinMultiplier , updateSavePointsMaxMultiplier | int , int , double , double | Parameters of the mechanism for using savepoints in transactions (used to avoid restarting the entire transaction, for example, in the subquery materialization mechanism):
| 5 , -1 , 0.8 , 3.0 |
changeBooleanOnSingleClick | boolean | Determines whether an event of changing a property of a logical type on the form is triggered by a single (true ) or double (false ) mouse click | false |
changeActionOnSingleClick | boolean | Determines whether the action call event on the form is triggered by a single (true ) or double (false ) mouse click | false |
info
In addition to the system parameters, the platform also has launch parameters which are set a little differently and are relevant mainly for startup (initialization) processes of various components of the platform and access to these components.