# MaxRequestWorkers setting

**URL:** <https://discourse.openondemand.org/t/maxrequestworkers-setting/734>\
**Category:** Get Help\
**Created:** [February 18, 2020, 2:05pm UTC](https://discourse.openondemand.org/t/maxrequestworkers-setting/734 "2020-02-18T14:05:48Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![gp4r](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/gp4r/32/62_2.png) [@gp4r](https://discourse.openondemand.org/u/gp4r)\
**Post date:** [February 18, 2020, 2:05pm UTC](https://discourse.openondemand.org/t/maxrequestworkers-setting/734/1 "2020-02-18T14:05:48Z")

</div>

Hello, we are seeing MaxRequestWorkers error on our OOD.

`[mpm_prefork:error] [pid 2186] AH00161: server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting`

Could you help me with how to see the MaxRequestWorkers value for OOD and how to increase it?

I found `<IfModule mpm_worker_module>` line in `/opt/rh/httpd24/root/etc/httpd/conf.modules.d/01-cgi.conf`. Is it safe to modify this file?

Thank you,  
Gisoo

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [February 18, 2020, 4:40pm UTC](https://discourse.openondemand.org/t/maxrequestworkers-setting/734/2 "2020-02-18T16:40:34Z")

</div>

I think here’s a good [serverfault](https://serverfault.com/questions/383526/how-do-i-select-which-apache-mpm-to-use/383634#383634) topic on the subject.

Yes it’s safe to modify these files, but they could be overwritten by a new install, so you’d be wise to write some automation around configuring your apache. Though the file `/opt/rh/httpd24/root/etc/httpd/conf.modules.d/00-mpm.conf` determines which type of mpm module you use (you’ve linked a CGI config file, that’s not the file/config you’re looking fo). Looks like default is prefork. If you want to switch types, then modify this file, if not, just leave it. If you’re not using any PHP modules, I’d suggest switching to `mpm_event_module`, otherwise stick with prefork. There are also links in this file to the actual apache documentation on all these threading modules.

Then I’d suggest dropping a brand new file into `/opt/rh/httpd24/root/etc/httpd/conf.d/` like say `worker.conf` that won’t get overwritten and putting your worker configurations _there_.

Looks like prefork is the default and what you’ve got configured (from the logs given), so that element has the only values in it.

```xml
<IfModule mpm_prefork_module>
    MaxRequestWorkers 512
</IfModule>

<IfModule mpm_event_module>
</IfModule>

<IfModule mpm_worker_module>
</IfModule>

```

If you do stick with prefork, just keep an eye on your memory when you start to top out in request workers.

---

<div class="post-metadata">

**Author:** ![gp4r](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/gp4r/32/62_2.png) [@gp4r](https://discourse.openondemand.org/u/gp4r)\
**Post date:** [February 18, 2020, 5:00pm UTC](https://discourse.openondemand.org/t/maxrequestworkers-setting/734/3 "2020-02-18T17:00:12Z")

</div>

Thank you. I have switched it to `mpm_event_module`.

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [February 18, 2020, 6:32pm UTC](https://discourse.openondemand.org/t/maxrequestworkers-setting/734/4 "2020-02-18T18:32:22Z")

</div>

That’s awesome, but you’ll still maybe want to do some quick math about how many concurrent connections you expect and whether or not your configuration can support that. Good luck!

[http://httpd.apache.org/docs/2.4/mod/event.html](http://httpd.apache.org/docs/2.4/mod/event.html)

---

<div class="post-metadata">

**Author:** ![gp4r](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/gp4r/32/62_2.png) [@gp4r](https://discourse.openondemand.org/u/gp4r)\
**Post date:** [February 19, 2020, 2:49pm UTC](https://discourse.openondemand.org/t/maxrequestworkers-setting/734/5 "2020-02-19T14:49:04Z")

</div>

Hello Jeff,

How do you check concurrent users and general ood usage. Do you use some special tool to get a data? I know you guys are using Google Analytic, but unsure it’s also show real data or only historic data.

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [February 19, 2020, 3:38pm UTC](https://discourse.openondemand.org/t/maxrequestworkers-setting/734/6 "2020-02-19T15:38:57Z")

</div>

So with apache you’ve got a bunch of options, but basically you’ll want to plugin to whatever Monitoring systems you’re already using for your HPC infrastructure.

We do use Google Analytics for pulling historic things like monthly reports. We use Splunk if need to do something a little more ad-hoc both in real-time or historic, so we’re indexing the apache logs. We’re currently using [ganglia](https://github.com/OSC/ondemand-metrics/) for a little bit of graphing, but are shortly going to switch to a [prometheus](https://github.com/OSC/ondemand_exporter) stack for graphinga and alerting at some point. All of these require you to buy into that stack, a Splunk subscription or the Prometheus infrastructure, etc. If you already have these things, cool!

If not, you may try [netdata](https://github.com/netdata/netdata) with the [apache plugin](https://docs.netdata.cloud/collectors/go.d.plugin/modules/apache/).This is a install just on the OOD webserver so you don’t need a larger by in to other stacks. Looks like you can even set it [behind apache](https://docs.netdata.cloud/docs/running-behind-apache/) for authentication. (This is just _ **my** _ suggestion because I’ve found netdata super helpful in the past running Apache stacks. I haven’t heard of other folks running it - we at OSC don’t - but again, in the past, in other projects it was super helpful. It’ll give you concurrent connections, request per second, CPU, memory, all in very nice graphs without having to install and maintain other infrastructure).

Other than that, a quick google search of “apache log parser bash” came up with some results. Those could be simple enough to use to achieve what you need. Like a simple `netstat -ant | grep -c ESTAB` every 30 or so seconds may give you good baseline, or at least it’s _some_ data easily obtained.

(As an aside, thanks for the question, because it looks like we have no documentation on how to monitor OOD so I’ve created [this ticket](https://github.com/OSC/ood-documentation/issues/235) for that!)

---

<div class="post-metadata">

**Author:** ![westburg.2](https://avatars.discourse-cdn.com/v4/letter/w/0ea827/32.png) [@westburg.2](https://discourse.openondemand.org/u/westburg.2)\
**Post date:** [May 26, 2022, 3:34pm UTC](https://discourse.openondemand.org/t/maxrequestworkers-setting/734/7 "2022-05-26T15:34:33Z")

</div>


