Priyanka,

Before I respond further, database lock problems are almost certainly not being caused by Tomcat itself. It's far more likely that the application(s) deployed on Tomcat are responsible for the problem.

Please see below for additional comments.

On 10/18/22 14:55, Kumawat, Priyanka wrote:
We have been encountered another issue with the Database locks
recently , yesterday there was been Table locks identified from the
Database team ,  and after certain period of time we have received
the below error on the Apache logs and we have to restart the
tomcat/Apache instances. >
>
: [Mon Oct 17 04:21:04.599196 2022] [mpm_event:error] [pid 10576:tid
140052698470144] AH00484: server reached MaxRequestWorkers setting,
consider raising the MaxRequestWorkers setting
This error message is unrelated to database locks, but if you have locked transactions on the database server, that may cause your application threads to stall and block-up the whole network.

we needed your suggestion as how these errors can cause the Apache
to  go with worker exhaustion error.

Apache version - 2.4.25

Note that this is the Apache httpd version, which is "old" but if you are using a package-managed version might not be actually out of date. You should check to ensure you are running the latest version of httpd, otherwise you may be exposing you and your users to security vulnerabilities.


HOLDAPP         HOLDER     AGNTHLDLCK WAITTAPP        WAITER     WTAGNTID  
HOLDMODE   OBJTYPE            TABNAME                   SCHEMA     WTNGSECS

--------------- ---------- ---------- --------------- ---------- --------- 
---------- ------------------ ------------------------- ---------- -----------

db2bp           DB2INST    25726      db2jcc_applicat WING2      26171     U    
      TABLE_LOCK         SALESDOCLI                WING2              616

Tomcat can be configured to perform some database operations on your behalf. Among those operations are the following:

1. User authentication
2. Durable session data storage

Neither of those, I suspect, would be using a table called "SALESDOCLI" and so I repeat my suspicion that your application is at fault, not Tomcat.

There is some good news, though: all the locked tables are the same, so it should be easy to check your application for accesses to that table and see what may be wrong.

I highly recommend that you and/or your programmers read this article for more information about database connection resource management:

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

Something else that may help in your situation as a band-aid would be to set a "query timeout" on your connections to abandon any query that takes too long. You could set this to a very long timeout like 60 seconds to ensure that your application, if it does get tied-up like this, will at least eventually become available without you having to restart your application server(s).

Hope that helps,
-chris

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

Reply via email to