0

UPDATE: Seems that the mysql deamon is the bottleneck!! Working on it - will let you know if this fixed my problems (and not switching to another mpm). UPDATE2: that was not the reason for my problem .. argh. Running out of ideas :).

Good evening

I do have a small problem with my webserver. After hours and hours of engineering and re-engineering I guess that it has something to do with the apache multiprocessing.

Using a redhat7 with an apache2.4.7 (httpd) service. Seems that the default at the moment is the mpm_prefork module. My problem: the request times are constantly low (0-2 sec) until some time after the httpd got started. Then the request times immediately go up to 30 seconds and more!

As far as I learned it would be better to switch to he module mpm_event or mpm_worker. However, my httpd has not loaded these modules. What I tried was to include the

  • copied httpd-mpm.conf default to /etc/httpd/conf.d/
  • httpd service restarts, loading the config seems to be ok

Next telling apache to load the correct module by modifying

  • /etc/httpd/conf.modules.d/00-mpm.conf
  • commenting: LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
  • un-commenting: LoadModule mpm_worker_module modules/mod_mpm_worker.so

The shared lib mod_mpm_worker.so is existing, however, httpd will fail as soon as I try to restart the service.

I am at the end with my algebra :). Have I overlooked something very very important?

All best, Reto

5
  • 1
    You've overlooked nginx. I would not recommend Apache as a web server these days. Sep 30, 2015 at 16:26
  • What's the error message when Apache fails to start..?
    – GregL
    Sep 30, 2015 at 16:26
  • Hy GregL. Seems that the problem is that I would need php to be compiled with php-zts. But I don't want to do this due to update-cycles in the future. Have to tripple-check my apache settings today to find the reason for these response times, bit I am pretty sure it is the apache causing the problem. Nothing found in error logs from system to mysql, but somewhen I'll find the problem ... Oct 1, 2015 at 8:46
  • I am seeing the same thing on Fedora 29. Did you ever find a solution @Reto-Stauffer?
    – RobbieTheK
    Jan 5, 2019 at 2:06
  • Hy @RobbieThek . My main problem was a cool but very ineffective SQL command. The requests took to much memory and the webserver started to queue the requests (does not matter whether preforking or workers were used). Thus, after working nicely for a while, the server was just running into an overload which caused my problems. I suggest to go one step back and - rather than reconfiguring the webserver - double-check how much resources are used by your scripts and try to identify possible candidates which are inefficient (queries, scripts). Jan 6, 2019 at 9:47

0

You must log in to answer this question.

Browse other questions tagged .