apache MPM settings are not applied

Bug #1807086 reported by Paul Gear
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu Repository Cache Charm
Fix Released
High
Haw Loeung

Bug Description

The settings for apache MPM workers are written to /etc/apache2/conf-available/000mpm-worker.conf by u-r-c. However, these don't take effect, because they are set already in
/etc/apache2/mods-available/mpm-worker.conf, and apparently, first match takes precedence.

This means that the u-r-c apache2 can run into these errors:
[Thu Dec 06 03:24:54.774311 2018] [mpm_worker:error] [pid 86272:tid 139974961301376] AH00288: scoreboard is full, not at MaxRequestWorkers

Workaround:
- update charm settings (in my case, I ran "juju config ubuntu-repository-cache apache2_mpm_maxrequestworkers=8192 apache2_mpm_serverlimit=128")
- wait for settings to apply
- on the unit: cd /etc/apache2; sudo cp conf-available/000mpm-worker.conf mods-available/mpm_worker.conf
- sudo service apache2 restart

Tags: canonical-is

Related branches

Paul Gear (paulgear)
tags: added: canonical-is
Revision history for this message
Haw Loeung (hloeung) wrote :

I can confirm this as seen today:

| $ juju config ubuntu-repository-cache | grep apache2_mpm -A1
| apache2_mpm_maxconnectionsperchild:
| default: 0
| --
| apache2_mpm_maxrequestworkers:
| default: 8192
| --
| apache2_mpm_maxsparethreads:
| default: 100
| --
| apache2_mpm_minsparethreads:
| default: 50
| --
| apache2_mpm_serverlimit:
| default: 512
| --
| apache2_mpm_startservers:
| default: 2
| --
| apache2_mpm_threadlimit:
| default: 64
| --
| apache2_mpm_threadsperchild:
| default: 64
| --
| apache2_mpm_type:
| default: worker

But yet, the written out config contains the defaults:

| ubuntu@machine-0:~$ cat /etc/apache2/conf-enabled/000mpm-worker.conf
| #
| # JUJU WARNING: This file is managed by Juju, do NOT edit
| #
|
| # worker MPM
| # StartServers: initial number of server processes to start
| # MaxClients: maximum number of simultaneous client connections
| # 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
| # MaxRequestsPerChild: maximum number of requests a server process serves
| <IfModule mpm_worker_module>
| StartServers 2
| MinSpareThreads 50
| MaxSpareThreads 100
| ThreadLimit 64
| ThreadsPerChild 64
| ServerLimit 5
| MaxRequestWorkers 256
| MaxConnectionsPerChild 0
| </IfModule>

It is only when you juju config/set does these values change:

| $ juju config ubuntu-repository-cache apache2_mpm_maxrequestworkers=16384 apache2_mpm_serverlimit=256 apache2_mpm_maxsparethreads=200 apache2_mpm_minsparethreads=100

So now:

| ubuntu@machine-0:~$ cat /etc/apache2/conf-enabled/000mpm-worker.conf
| #
| # JUJU WARNING: This file is managed by Juju, do NOT edit
| #
|
| # worker MPM
| # StartServers: initial number of server processes to start
| # MaxClients: maximum number of simultaneous client connections
| # 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
| # MaxRequestsPerChild: maximum number of requests a server process serves
| <IfModule mpm_worker_module>
| StartServers 2
| MinSpareThreads 100
| MaxSpareThreads 200
| ThreadLimit 64
| ThreadsPerChild 64
| ServerLimit 256
| MaxRequestWorkers 16384
| MaxConnectionsPerChild 0
| </IfModule>

Changed in ubuntu-repository-cache:
status: New → Confirmed
importance: Undecided → High
Haw Loeung (hloeung)
Changed in ubuntu-repository-cache:
assignee: nobody → Haw Loeung (hloeung)
status: Confirmed → In Progress
Haw Loeung (hloeung)
Changed in ubuntu-repository-cache:
assignee: Haw Loeung (hloeung) → nobody
Haw Loeung (hloeung)
Changed in ubuntu-repository-cache:
status: In Progress → Triaged
Haw Loeung (hloeung)
Changed in ubuntu-repository-cache:
assignee: nobody → Haw Loeung (hloeung)
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.