Results 1 to 9 of 9
  1. #1
    Join Date
    May 2007
    Posts
    85

    Question Apache issue MaxClients (10)

    Hi guys,

    I want to change prefork to worker. I have already uncommented the required line, but when I am restarting the Apache, I always getting this error:

    Starting httpd: WARNING: MaxClients (10) must be at least as large
    as ThreadsPerChild (25). Automatically
    increasing MaxClients to 25.

    Actually I have 'MaxClients 150' in my httpd.conf, so I have no idea why it displays this error.

    Thanks

  2. #2
    Join Date
    Oct 2010
    Location
    Iraq
    Posts
    409
    hello,

    for worker mpm you will need to recompile apache with worker mpm module.
    can you please let us know what is your OS, how did you installed Apache in the first place. have you used any panel.... etc

    Highest Regards
    Mohammed H
    Xsltel OÜ | Fast and Steady Internet services
    cPanel Webhosting | VPS Hosting | Since 2011

  3. #3
    Join Date
    May 2007
    Posts
    85
    Mohammed,
    Thanks for your reply.

    I am using CentOS 5.5
    No control panel.

  4. #4
    Join Date
    Oct 2010
    Location
    Iraq
    Posts
    409
    Hello,

    if you used yum to install Apache, you can change to mpm worker by uncommenting the line in this file
    /etc/sysconfig/httpd
    Code:
    #HTTPD=/usr/sbin/httpd.worker
    just remove # save file and restart apache server.

    Highest Regards
    Mohammed H
    Xsltel OÜ | Fast and Steady Internet services
    cPanel Webhosting | VPS Hosting | Since 2011

  5. #5
    Join Date
    May 2007
    Posts
    85
    Quote Originally Posted by XSLTel View Post
    Hello,

    if you used yum to install Apache, you can change to mpm worker by uncommenting the line in this file
    /etc/sysconfig/httpd
    Code:
    #HTTPD=/usr/sbin/httpd.worker
    just remove # save file and restart apache server.

    Highest Regards
    Mohammed H
    I already did that, but I am still keep getting this message everytime I restart apache, thanks.

  6. #6
    Join Date
    Oct 2010
    Location
    Iraq
    Posts
    409
    Hello,

    some releases of httpd is including another file containing the parameters of MaxClients, MaxThreads, etc... .

    may be you can find that parameters in
    /etc/httpd/conf.d/swtune.conf

    you may want to remove that file and keep changing those parameters in httpd.conf or you can change them directly in that file.

    NOTE : if you don't have that file try to browse files in /etc/httpd/conf.d

    Highest Regards
    Mohammed H
    Xsltel OÜ | Fast and Steady Internet services
    cPanel Webhosting | VPS Hosting | Since 2011

  7. #7
    Join Date
    Feb 2008
    Location
    Houston, Texas, USA
    Posts
    3,262
    Try this. service httpd stop. Wait 5 seconds then service httpd start.

    Regards
    UNIXy - Fully Managed Servers and Clusters - Established in 2006
    Server Management - Unlimited Servers. Unlimited Requests. One Plan!
    cPanel Varnish Plugin -- Seamless SSL Caching (Let's Encrypt, AutoSSL, etc)
    Slow Site or Server? Unable to handle traffic? Same day performance fix: joe@unixy

  8. #8
    Join Date
    May 2007
    Posts
    85
    Quote Originally Posted by XSLTel View Post
    Hello,

    some releases of httpd is including another file containing the parameters of MaxClients, MaxThreads, etc... .

    may be you can find that parameters in
    /etc/httpd/conf.d/swtune.conf

    you may want to remove that file and keep changing those parameters in httpd.conf or you can change them directly in that file.

    NOTE : if you don't have that file try to browse files in /etc/httpd/conf.d

    Highest Regards
    Mohammed H
    Thanks, that's where it was located

  9. #9
    Join Date
    Apr 2011
    Location
    Las Vegas, NV
    Posts
    1,643
    Quote Originally Posted by XSLTel View Post
    for worker mpm you will need to recompile apache with worker mpm module.
    No, you don't need to recompile anything.

    I pulled my hair out over this issue for months, but finally got it. Before increasing serverlimit & maxclients in the prefork section of htpd.conf, increase them in the following file.

    /etc/httpd/conf.d/swtune.conf

    If you do that you won't throw an error on httpd startup.

Similar Threads

  1. Track down apache maxclients issue, check slowqueries
    By kenop in forum Systems Management Requests
    Replies: 4
    Last Post: 08-09-2011, 01:20 PM
  2. Tracking down apache maxclients issue
    By kenop in forum Hosting Security and Technology
    Replies: 1
    Last Post: 08-08-2011, 11:51 AM
  3. maxclients issue
    By gaquay in forum Hosting Security and Technology
    Replies: 6
    Last Post: 05-28-2009, 02:40 AM
  4. Apache MaxClients
    By neonlexx in forum Hosting Security and Technology
    Replies: 11
    Last Post: 04-10-2003, 04:44 PM
  5. Apache MaxClients
    By emkatzen in forum Hosting Security and Technology
    Replies: 2
    Last Post: 12-01-2001, 01:12 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •