Ayub,

On 6/15/21 17:27, Ayub Khan wrote:
Chris,

I am getting the connection from the connection pool, defined using
HikariCP.

What I have noticed is, as soon as database results are fetched I am
printing it in the log, and I see there is a delay between when the results
are printed in the log to that of the response received by the client
(mobile or postman).

A code sample would help.

Are you streaming the results to the client before you release the database connection back to the pool?

If there is load test then I that this delay increases on the client side.
I am using org.apache.coyote.http11.Http11NioProtocol for the connector. Is
there any config which can be changed to reduce the delay to the client
side ?

It shouldn't be a surprise that more load = more delays. The delays you are seeing can be due to a great number of things.

Please post a code sample for how you are performing your database operations AND how you are packaging the data for client consumption.

-chris

On Wed, Jun 16, 2021 at 12:22 AM Christopher Schultz <
ch...@christopherschultz.net> wrote:

Ayub,

On 6/15/21 11:33, Ayub Khan wrote:
Would it be a cursor issue, as there seems to be how cursors are handled
in
postgres and Oracle database. Below are the steps we take from jdbc side


     1. open connection
     2. set  auto commit to false
     3. create callable statement
     4. execute the call
     5. get the results
     6. set autocommit to true
     7. close the resultset,callable statement and connection

Is this a read-only set of steps, or are you also writing anywhere in
there? How is your resource management? If you aren't going things
properly[1], it's definitely possible to tie your database up in knots.

-chris

[1]

https://blog.christopherschultz.net/2009/03/16/properly-handling-pooled-jdbc-connections/

On Thu, Jun 10, 2021 at 8:10 AM Ayub Khan <ayub...@gmail.com> wrote:

Seeing client write waits on postgresql as attached in the image. Is
there
any bottle neck which is causing the client write waits on postgresql ?

Below is the test setup

Jmeter-->(load balanced tomcat on ec2 instances)---->rds read replicas

All these are running on different ec2 instances in AWS cloud in the
same
region

below is the config of the http connector on tomcat:

<Connector port="8080"
protocol="org.apache.coyote.http11.Http11NioProtocol"
                 connectionTimeout="120000" maxThreads="50000"
maxConnections="50000"
                 URIEncoding="UTF-8"
                 redirectPort="8443" />

Below are the specs of the server:

Ec2 instance which is running tomcat 8.5

c5.9x large
36 vpcu
72GB memory
10GBPS network
EBS band width 9500


postgresql RDS db.r6g.16xlarge

512 GB memory
64 VCPU
25 Gibs network
AWS Gravitron cpu

--Ayub




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to