0

I have configured apache with "Worker" MPM module.

See the worker module settings:

<IfModule mpm_worker_module>
    StartServers          4
    ServerLimit           20
    MaxClients            1280
    MinSpareThreads       64
    MaxSpareThreads       192
    ThreadsPerChild       64
    MaxRequestsPerChild   0
</IfModule>

Now if I do the graceful apache restart, it raise the following message in apache log:

[notice] mod_python: Creating 8 session mutexes based on 5 max processes and 64 max threads.

But if I do the complete restart then it create sessions on 20 max processes.

[notice] mod_python: Creating 8 session mutexes based on 20 max processes and 64 max threads.

What this cause the error?

Apache stops working if it reach to MaxClients settings. And then need to do apache restart.

Please help, I am newbie in this domain.

Thanks!

Ahsan
  • 151
  • 1
  • 1
  • 6

1 Answers1

1

The 'error' is just a notice by the mod_python module when it starts. You can disregard it of if you are not using the python module you can unistall it with a2dismod python .

When Apache reaches its MaxClient settings then it doesn't serve new user connections until previous ones are freed. You can raise the MaxClient setting and reload/restart Apache and check that you have enough RAM memory to support those connections (memory consumption will raise as well with the number of connections).

If memory / number of connections is an issue then you can take a look at Nginx as an alternative to apache.

LinuxDevOps
  • 1,754
  • 9
  • 14
  • I am using the mod_pyhton, And I have also increased the MaxClient value. But the the issue is why `apache2 graceful` reduce the max processes to `5` from `20` ? – Ahsan Mar 31 '14 at 18:01
  • I see now what you mean. My guess is that in the graceful restart when mod_python is loaded, it does only in the children processes that are already liberated, or (maybe you see another notice after that) at the end even given that message, all children are indeed loaded with the python module, this could be check with `lsof`. In any case, in doubt, do a clean restart. – LinuxDevOps Mar 31 '14 at 18:14
  • This was indeed an informational log message that happened in apache 2.2 because of mod_python inclusion. ``mod_python`` was abandoned almost a decade ago, apache 2.4 ships without it. It's all quite obsolete. – user5994461 Apr 28 '20 at 00:17