Setting appropriate values for the database parameters based on the actual needs can reduce the occurrence of database deadlock and block hence can improve the concurrency and stability of the Web application.
Common database optimization techniques include: optimizing the table structure, using proper index, and optimizing SQL statement. Additionally, check the following database server settings:
Instead of opening and closing connections for every request, connection pooling uses a cache of database connections that can be reused when future requests to the database are required. For example, the connection pooling is enabled by default for SQL Anywhere if the database server is on the same machine as PowerBuilder. If SQL Anywhere is on a different machine, you need to manually enable the connection pooling.
Setting appropriate timeout period for commands based on the actual needs can reduce the occurrence of database deadlock and block. You may set the timeout values for transaction, session, and request in the PowerServer C# solution > ServerAPIs project > AppConfig > Applications.json file or in the corresponding file after compilation.