Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2024-04-25, 23:33:30

Author Topic: consider raising the MaxClients setting  (Read 17351 times)

0 Members and 1 Guest are viewing this topic.

Offline alexo

  • Junior Member
  • *
  • Posts: 45
  • Karma: +0/-0
    • View Profile
consider raising the MaxClients setting
« on: 2014-01-29, 02:59:36 »
Hello

After moving from Kloxo to Kloxo-Mr, but account cann't work properly and i'm getting this error

Code: [Select]
[Wed Jan 29 04:07:17 2014] [error] server reached MaxClients setting, consider raising the MaxClients setting
Code: [Select]
[root@server conf.d]# sh /script/sysinfo

A. Kloxo-MR: 6.5.0.f-2014012802

B. OS: CentOS release 5.10 (Final) i686

C. Apps:
   1. MySQL: mysql55-5.5.35-1.ius.el5
   2. PHP: php52-5.2.17-6.ius.centos5
   3. Httpd: httpd-2.2.26-1.el5
   4. Lighttpd: --uninstalled--
   5. Nginx: --uninstalled--
   6. Qmail: qmail-toaster-1.03-1.3.35.mr.el5
      - with: courier-imap-toaster-4.1.2-1.3.14.mr.el5
   7. Dns: bind-9.9.4-1.P2.el5

D. Php-type (for Httpd/proxy): mod_php_ruid2

E. Memory:
                total       used       free     shared    buffers     cached
   Mem:          3072        445       2626          0          0        141
   -/+ buffers/cache:        303       2768
   Swap:            0          0          0

I need this php version (php52), and most of my sites  don't work well under Lighttpd and Nginx.

If i understand right, i must increase MaxClients in httpd.conf, but unfortunately i don't find how to do it.

--
Any advice will be appreciated.

Offline alexo

  • Junior Member
  • *
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Re: consider raising the MaxClients setting
« Reply #1 on: 2014-01-29, 03:05:33 »
Also the  the server responds very slowly :-(

Offline alexo

  • Junior Member
  • *
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Re: consider raising the MaxClients setting
« Reply #2 on: 2014-01-29, 03:45:00 »
Just a little explanation - i did fresh install of Kloxo-MR and restore my site (just only one site in this account) and databases.

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: consider raising the MaxClients setting
« Reply #3 on: 2014-01-29, 04:07:52 »
Copy /etc/apache /tpl/~lxcenter.conf.tpl to custom.~lxcenter.conf.tpl and then modified this custom file. Better using 'Apache optimize' in 'webserver config'.

Remember, you can use nginx-proxy or lighttpd-proxy when using php 5.2 but need enable 'secondary php'.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline alexo

  • Junior Member
  • *
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Re: consider raising the MaxClients setting
« Reply #4 on: 2014-01-29, 04:29:01 »
Sorry MRatWork don't understand which file to copy and modify?

There isn't any /etc/apache /tpl/~lxcenter.conf.tpl file

Offline alexo

  • Junior Member
  • *
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Re: consider raising the MaxClients setting
« Reply #5 on: 2014-01-29, 04:37:45 »
Do you mean this file - /etc/httpd/conf.d/~lxcenter.conf

So i must do changes in this file? if yes, i don't understand why to modify custom file.

Regarding "nginx-proxy or lighttpd-proxy" - > few months ago i try to test with both this, but unfortunately this site don't work properly.

thank you

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: consider raising the MaxClients setting
« Reply #6 on: 2014-01-29, 04:41:49 »
Sorry, I mean '/home/apache/tpl/~lxcenter.conf.tpl'.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline alexo

  • Junior Member
  • *
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Re: consider raising the MaxClients setting
« Reply #7 on: 2014-01-30, 20:59:04 »
Sorry, I mean '/home/apache/tpl/~lxcenter.conf.tpl'.

Sorry don't understand you right

Quote
Copy /home/apache/tpl/~lxcenter.conf.tpl to custom.~lxcenter.conf.tpl and then modified this custom file

Can you pls explain ?

So you mean, to get this .tpl file, make modifications and put where ? Left in the same folder or move to another folder?

What you mean "custom.~lxcenter.conf.tpl" - it's like custom name, if yes where i must put this file?

thank you.

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: consider raising the MaxClients setting
« Reply #8 on: 2014-01-31, 04:43:25 »
The same folder, modified the content and then restart httpd service.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline alexo

  • Junior Member
  • *
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Re: consider raising the MaxClients setting
« Reply #9 on: 2014-01-31, 15:24:25 »
Ok. thx

What i did is ->

Code: [Select]
cp ~lxcenter.conf.tpl custom.~lxcenter.conf.tpl
nano custom.~lxcenter.conf.tpl

and make such modifications

Code: [Select]
Timeout 150
KeepAlive <?php echo $keepalive?>

MaxKeepAliveRequests 100
KeepAliveTimeout 15

<IfModule prefork.c>
    StartServers 2
    MinSpareServers <?php echo $minspareservers?>
    MaxSpareServers <?php echo $maxspareservers?>
    ServerLimit 256
    MaxClients  512

    <IfVersion >= 2.4>
        MaxRequestWorkers <?php echo $maxspareservers?>
        MaxConnectionsPerChild <?php echo $maxrequestsperchild?>

    </IfVersion>
    <IfVersion < 2.4>
        MaxClients 512
        MaxRequestsPerChild <?php echo $maxrequestsperchild?>

    </IfVersion>
    MaxMemFree 2
    SendBufferSize 65536
    ReceiveBufferSize 65536
</IfModule>

<IfModule itk.c>
    StartServers 2
    MinSpareServers <?php echo $minspareservers?>
    MaxSpareServers <?php echo $maxspareservers?>
    ServerLimit      256
    MaxClients       512
    <IfVersion >= 2.4>
        MaxRequestWorkers <?php echo $maxspareservers?>
        MaxConnectionsPerChild <?php echo $maxrequestsperchild?>

    </IfVersion>
    <IfVersion < 2.4>
        MaxClients 256
        MaxRequestsPerChild <?php echo $maxrequestsperchild?>

    </IfVersion>
    MaxMemFree 2
    SendBufferSize 65536
    ReceiveBufferSize 65536
</IfModule>

<IfModule worker.c>
    StartServers 2
    MinSpareThreads <?php echo $minsparethreads?>
    MaxSpareThreads <?php echo $maxsparethreads?>
    ServerLimit      250
    MaxClients       512
    ThreadsPerChild 25
    <IfVersion >= 2.4>
        MaxRequestWorkers 150
        MaxConnectionsPerChild 0
    </IfVersion>
    <IfVersion < 2.4>
        MaxClients 250
        MaxRequestsPerChild 0
    </IfVersion>

    ThreadStackSize 8196
    MaxMemFree 2
    SendBufferSize 65536
    ReceiveBufferSize 65536
</IfModule>

<IfModule event.c>
    StartServers 2
    MinSpareThreads <?php echo $minsparethreads?>
    MaxSpareThreads <?php echo $maxsparethreads?>
    ServerLimit      250
    MaxClients       250
    ThreadsPerChild 25
    MaxRequestsPerChild 0
    ThreadStackSize 8196
    <IfVersion >= 2.4>
        MaxRequestWorkers 150
        MaxConnectionsPerChild 0
    </IfVersion>
    <IfVersion < 2.4>
        MaxClients 250
        MaxRequestsPerChild 0
    </IfVersion>

    SendBufferSize 65536
    ReceiveBufferSize 65536
</IfModule>

Include /home/apache/conf/defaults/*.conf
Include /home/apache/conf/domains/*.conf
Include /home/apache/conf/webmails/*.conf


restart it

Code: [Select]
top - 17:22:06 up 1 day,  2:57,  1 user,  load average: 0.03, 0.05, 0.01
but it's impossible to open any page on my websites.

Code: [Select]
[root@server tpl]# sh /script/sysinfo

A. Kloxo-MR: 6.5.0.f-2014013101

B. OS: CentOS release 5.10 (Final) i686

C. Apps:
   1. MySQL: mysql55-5.5.35-1.ius.el5
   2. PHP: php52-5.2.17-6.ius.centos5
   3. Httpd: httpd-2.2.26-1.el5
   4. Lighttpd: --uninstalled--
   5. Nginx: --uninstalled--
   6. Qmail: qmail-toaster-1.03-1.3.35.mr.el5
      - with: courier-imap-toaster-4.1.2-1.3.14.mr.el5
   7. Dns: bind-9.9.4-1.P2.el5

D. Php-type (for Httpd/proxy): mod_php_ruid2

E. Memory:
                total       used       free     shared    buffers     cached
   Mem:          3072       2125        946          0          0       1622
   -/+ buffers/cache:        502       2569
   Swap:            0          0          0

BTW, even 1 week ago this account work properly under Kloxo old panel :-(

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: consider raising the MaxClients setting
« Reply #10 on: 2014-01-31, 15:30:20 »
When using php 5.2 (via 'secondary php') web will be slow because running under suphp.

Better using php 5.3 or 5.4 if possible with php-fpm_event and nginx-proxy. Certain application which designed in php 5.2 possible running in php 5.3 with some tricks.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline alexo

  • Junior Member
  • *
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Re: consider raising the MaxClients setting
« Reply #11 on: 2014-01-31, 15:35:30 »
I don't enabled - Enable Php 5.2 (use Php52s) As Secondary Php

Offline alexo

  • Junior Member
  • *
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Re: consider raising the MaxClients setting
« Reply #12 on: 2014-01-31, 15:37:35 »
So, what is your advice? try php 5.3 (btw which one? php53 or php53u)?

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: consider raising the MaxClients setting
« Reply #13 on: 2014-01-31, 15:39:30 »
If possible don't choose 'php52' in 'php branch'. Possible have troubles with other packages (like mysql).

If possible, select 'php53u' and enable 'secondary php'.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline alexo

  • Junior Member
  • *
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Re: consider raising the MaxClients setting
« Reply #14 on: 2014-01-31, 15:46:36 »
Now php53u + php-fpm_event +   Enable Php 5.2  + AddHandler application/x-httpd-php52 .php' in .htaccess

500 internal server errror on all my sites :-(

 


MRatWork Affiliates:    BIGRAF(R) Inc.    House of LMAR    EFARgrafix
Click Here

Page created in 0.032 seconds with 21 queries.

web stats analysis