Hello Christopher ,

Thank you for your assistance !.Please find the mpm event given under 
httpd.mpm.conf file on the server as below , the max request worker was 
increased 50 more , approx two months before , that time we faced the same 
issue with Max request error and Memory got exhausted on server , the root 
cause was concluded that time was insufficient memory part of solution 16GB 
memory was added to the server along with the Max worker increase, the tomcat 
application heap size was also been adjusted -

But we have started seeing the same kind of problems again , the tomcat went to 
crash status with Out of memory errors , and Apache error logs with Max request 
errors , whole production environment due to this .

It occurred twice recently - 16th Sept and 20th Sept.

**********************************************************************
Error details -

: [Tue Sep 20 10:25:23.518687 2022] [mpm_event:error] [pid 29112:tid 
140343038482176] AH00484: server reached MaxRequestWorkers setting, consider 
raising the MaxRequestWorkers setting
[Tue Sep 20 10:48:08.134955 2022] [mpm_event:error] [pid 23940:tid 
140413844547328] AH00484: server reached MaxRequestWorkers setting, consider 
raising the MaxRequestWorkers setting


[root@ustlswh552 logs]# uptime
05:08:35 up 72 days,  5:39,  2 users,  load average: 0.22, 0.13, 0.07

/opt/tomcat/apache-tomcat-8.5.5/logs/localhost.2022-09-16.log

16-Sep-2022 15:49:00.672 SEVERE [ajp-nio-8009-exec-117] 
org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for 
servlet [ws] in context with path [/thq] threw exception [Request processing 
failed; nested exception is java.lang.OutOfMemoryError: unable to create new 
native thread] with root cause
java.lang.OutOfMemoryError: unable to create new native thread
        at java.lang.Thread.start0(Native Method)



******************************************************************************************

# event MPM
# StartServers: initial number of server processes to start
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestWorkers: maximum number of worker threads
# MaxConnectionsPerChild: maximum number of connections a server process serves
#                         before terminating
<IfModule mpm_event_module>
    StartServers             3
    MinSpareThreads         75
    MaxSpareThreads        250
    ThreadsPerChild         50
    MaxRequestWorkers      500
    MaxConnectionsPerChild   0
</IfModule>


Thanks & Regards,

Priyanka Kumawat | Middleware Admin
T +91.7879364483
EMail - priyanka.kuma...@dxc.com
DL - ams-leveraged-webadmin-offsh...@dxc.com

DXC Technology





-----Original Message-----
From: Christopher Schultz <ch...@christopherschultz.net>
Sent: 28 September 2022 00:19
To: Tomcat Users List <users@tomcat.apache.org>
Subject: Re: MaxRequestWorkers error

Koustav,

On 9/27/22 11:09, Naha, Koustav wrote:
> We have Tomcat and Apache installed in our production environment
> since
> 5/6 years. Everything was going fine until we started getting
> application not responding status from users, upon checking we found
> out that there was a MaxRequest error as below,
>
>   * In Apache log we have found this error.
>
> [Tue Sep 20 10:48:08.134955 2022] [mpm_event:error] [pid 23940:tid
> 140413844547328] AH00484: server reached MaxRequestWorkers setting,
> consider raising the MaxRequestWorkers setting
>
>   * we have seen the below error on tomcat logs

Your attachment has been removed from the mailing list. Can you please provide 
a text-only description of the problem?

> We increased 16gb memory on both servers , now we have 32 Gb memory in
> each servers. But the issue still is there.

You could have 1TiB of memory on your server and it would not solve the issue 
you are reporting.

> Suddenly we start getting the error and we have to restart Tomcat and
> Apache.
>
> FAQ:
>
>  1. Need permeant Solution on this as restarting the instances has
>     became too frequent these days.
>  2. We increased MaxRequestWorker value 400 from 200.
>
> <IfModule mpm_worker_module>
>      StartServers             3
>      MinSpareThreads         75
>      MaxSpareThreads        250
>      ThreadsPerChild         25
>      MaxRequestWorkers      400
>      MaxConnectionsPerChild   0
> </IfModule>

Your error message says "[mpm_event:error]" which suggests you are using the 
"event" MPM and not the "worker" MPM. You have configured the "worker" MPM 
above. Do you have a different config section for mpm_event_module?

Another relevant setting is "ServerLimit".

>  3. Database and network team reported no unusual activity during the issue.

Good. That suggests you don't actually have a "problem". You are just hitting 
the limits imposed by your configuration.

>  4. Code is refreshed every month , no issue found on coding side.
>  5. While the issue starts the server becomes low on memory.

If you are running httpd and Tomcat on the same machine, my guess is that the 
memory increase is due to additional load on the application, not the web 
server. The web server should be using minimal memory compared to your 
application.

-chris

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



DXC Technology Company -- This message is transmitted to you by or on behalf of 
DXC Technology Company or one of its affiliates. It is intended exclusively for 
the addressee. The substance of this message, along with any attachments, may 
contain proprietary, confidential or privileged information or information that 
is otherwise legally exempt from disclosure. Any unauthorized review, use, 
disclosure or distribution is prohibited. If you are not the intended recipient 
of this message, you are not authorized to read, print, retain, copy or 
disseminate any part of this message. If you have received this message in 
error, please destroy and delete all copies and notify the sender by return 
e-mail. Regardless of content, this e-mail shall not operate to bind DXC 
Technology Company or any of its affiliates to any order or other contract 
unless pursuant to explicit written agreement or government initiative 
expressly permitting the use of e-mail for such purpose.

Reply via email to