Database Connections

XRAY: How to tune Xray for heavy loads?

AuthorFullName__c
Ariel Kabov
articleNumber
000004533
ft:sourceType
Salesforce
FirstPublishedDate
2019-08-25T06:48:45Z
lastModifiedDate
2022-11-12
VersionNumber
8
We can alter the maximum connections each Xray microservice can open to the Postgres DB.
This will be configured in the $XRAY_HOME/etc/system.yaml file.

Tuning example:
server:
  database:
    #Default: 60
    maxOpenConnections: 90
analysis:
  database:
    #Defualt: 30
    maxOpenConnections: 60
indexer:
  database:
    #Default: 30
    maxOpenConnections: 60
persist:
  database:
    #Default: 30
    maxOpenConnections: 60



Important: Do not forget to increase the number of connections the Postgres DB can accept.
As a rule of thumb we will require from the DB a number of connections based on:

Total # of connections = (number of nodes) * (maxOpenConnServer + maxOpenConnPersist + maxOpenConnAnalysis + maxOpenConnIndexer) + 50;