MRatWork Forum by Mustafa Ramadhan
Sawo Project - Kloxo-MR Discussions => Kloxo-MR Technical Helps => Topic started by: alexo 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
[Wed Jan 29 04:07:17 2014] [error] server reached MaxClients setting, consider raising the MaxClients setting
[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.
-
Also the the server responds very slowly :-(
-
Just a little explanation - i did fresh install of Kloxo-MR and restore my site (just only one site in this account) and databases.
-
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'.
-
Sorry MRatWork don't understand which file to copy and modify?
There isn't any /etc/apache /tpl/~lxcenter.conf.tpl file
-
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
-
Sorry, I mean '/home/apache/tpl/~lxcenter.conf.tpl'.
-
Sorry, I mean '/home/apache/tpl/~lxcenter.conf.tpl'.
Sorry don't understand you right
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.
-
The same folder, modified the content and then restart httpd service.
-
Ok. thx
What i did is ->
cp ~lxcenter.conf.tpl custom.~lxcenter.conf.tpl
nano custom.~lxcenter.conf.tpl
and make such modifications
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
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.
[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 :-(
-
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.
-
I don't enabled - Enable Php 5.2 (use Php52s) As Secondary Php
-
So, what is your advice? try php 5.3 (btw which one? php53 or php53u)?
-
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'.
-
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 :-(
-
service httpd restart
Stopping httpd: [FAILED]
Starting httpd: (98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
[FAILED]
-
Try 'sh /script/fix-chownchmod' and then 'sh /script/restart-all' to see if any error/warning/alert found.
-
After running 'sh /script/fixweb; sh /script/restart-web' still found error, try reboot.
-
sh /script/restart-web
Stopping httpd: [FAILED]
Starting httpd: (98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
[FAILED]
Stopping php-fpm: [ OK ]
Starting php-fpm: [ OK ]
after reboot
sh /script/restart-web
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
Stopping php-fpm: [ OK ]
Starting php-fpm: [ OK ]
BTW, did i need to add this line ?
AddHandler application/x-httpd-php52 .php
Just now some of my sites are online and properly working (i hope) , but 1 site don't work (wordpress)
This is from this wordpress site .htaccess file
###Start Kloxo PHP config Area
### Please Don't edit these comments or the content in between. kloxo uses this to recognize the lines it writes to the the file. If the above line is corrupted, it may fail to recognize them, leading to multiple lines.
### begin content - please not remove this line
### MR -- attention
### 1. Move '#<Ifmodule !mod_php5.c>' until '#</Ifmodule>' on
### above '###Start Kloxo PHP config Area'
### 2. Remove # in front of '#<Ifmodule !mod_php5.c>' and '#</Ifmodule>'
### on point (1)
### 3. Remove # in front of 'AddHandler x-httpd-php52' to activate secondary-php
### on point (1)
### 4. Or Remove # in front of 'AddHandler x-httpd-php' to activate primary-php
### on point (1) if select suphp_worker/_event for primary-php
#<Ifmodule !mod_php5.c>
#AddHandler x-httpd-php52 .php
#AddHandler x-httpd-php .php
#</Ifmodule>
<Ifmodule mod_php5.c>
php_value upload_max_filesize 16M
php_value max_execution_time 180
php_value max_input_time 180
php_value memory_limit 64M
php_value post_max_size 32M
php_flag register_globals off
php_flag display_errors off
php_flag file_uploads on
php_flag log_errors off
php_flag output_buffering off
php_flag register_argc_argv on
php_flag magic_quotes_gpc off
php_flag magic_quotes_runtime off
php_flag magic_quotes_sybase off
php_flag mysql.allow_persistent off
php_flag register_long_arrays on
php_flag allow_url_fopen on
php_flag cgi.force_redirect on
php_flag enable_dl on
</Ifmodule>
### end content - please not remove this line
###End Kloxo PHP config Area
I need to keep it, or this can be from previous kloxo version ?
-
Add 'AddHandler application/x-httpd-php52 .php' in .htacces file only need if you want running application in /home/<user>/<domain>/ under php 5.2 version. Without add this line that mean application will be running under php 5.3 version.
-
Thank you MRatWork
Now everythink working properly on my 2 VPS accounts.
thanks once again ! :-)
-
Ok. thx
What i did is ->
cp ~lxcenter.conf.tpl custom.~lxcenter.conf.tpl
nano custom.~lxcenter.conf.tpl
and make such modifications
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
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.
[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 :-(
Server limit value should be greater than maxclient.
-
Because secondary dns using suphp, ownership and permissions are crucial factors. Run 'sh /script/fix-chownchmod' to fix this issue.