MRatWork Forum by Mustafa Ramadhan
Sawo Project - Kloxo-MR Discussions => Kloxo-MR Tips and Tricks => Topic started by: armandino on 2014-12-16, 06:32:52
-
// this is my server ,, can be optimize more ?? 12 clients + admin // around 50 domains
A. Kloxo-MR: 6.5.0.f-2014102601
B. OS: CentOS release 5.11 (Final) i686
C. Apps:
1. MySQL: mysql55-5.5.41-1.ius.el5
2. PHP: php54-5.4.35-1.ius.el5
3. Httpd: httpd-2.2.29-1.mr.el5
4. Lighttpd: --uninstalled--
5. Nginx: --uninstalled--
6. Qmail: qmail-toaster-1.03-1.3.43.mr.el5
- with: courier-imap-toaster-4.1.2-1.8.7
7. Dns: bind-9.9.5-1.el5
D. Php-type (for Httpd/proxy): mod_php_ruid2
E. Memory:
total used free shared buffers cached
Mem: 2048 747 1300 0 0 511
-/+ buffers/cache: 236 1811
Swap: 0 0 0
-
1. Select 'optimize' for 'apache optimize' in 'webserver config'
2. Install mod-pagespeed with 'yum install mod-pagespeed-stable'
3. install apc with 'yum install php54-pecl-apc'
4. install cache plugins in website applications (like hypercache in wordpress)
5. Run 'sh /script/fixweb; sh /script/restart web'
-
after modification ... server is out of resources
OS Centos 5 32-bit
Status running
Used memory 2047 MB of 2048 MB
[root@vps1 ~]# top
-bash: fork: Cannot allocate memory
i upgrade today from kloxo to kloxo-mr because of php oldnest ... but in kloxo server was sucking only 400-500 MB of 1G
after migrate to kloxo-mr i had to upgrade vps again to ... to 2G ...
i neeed solutions ... to works smooth.
-
[Tue Dec 16 19:42:38 2014] [error] [mod_pagespeed 1.8.31.5-4307 @1300] [1216/194238:ERROR:worker.cc(120)] Unable to start worker thread
[Tue Dec 16 19:42:48 2014] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Tue Dec 16 19:42:50 2014] [error] [mod_pagespeed 1.8.31.5-4307 @1356] Failed to make directory
[Tue Dec 16 19:42:53 2014] [error] [mod_pagespeed 1.8.31.5-4307 @1355] Could not create directories for file /var/cache/mod_pagespeed/prop_page/http,3A/,2Fwww.revistasingur.ro/component/mailto/,3Ftmpl=component,26link=29e0be69a0b9ed60e33e2e1e67a42117bb193a66_cE5TfZn1Io,40Desktop,40beacon_cohort,.temp
[Tue Dec 16 19:42:53 2014] [error] [mod_pagespeed 1.8.31.5-4307 @1355] /var/cache/mod_pagespeed/prop_page/http,3A/,2Fwww.revistasingur.ro/component/mailto/,3Ftmpl=component,26link=29e0be69a0b9ed60e33e2e1e67a42117bb193a66_cE5TfZn1Io,40Desktop,40beacon_cohort,.tempXlYtJG:0: opening temp file: No such file or directory
[Tue Dec 16 19:42:53 2014] [error] [mod_pagespeed 1.8.31.5-4307 @1355] [1216/194253:ERROR:worker.cc(120)] Unable to start worker thread
[Tue Dec 16 19:42:58 2014] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Tue Dec 16 19:43:09 2014] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Tue Dec 16 19:43:19 2014] [error] (12)Cannot allocate memory: fork: Unable to fork new process
-
Still using 'mod_php_ruid2'?. If yes, change to 'php-fpm_event' in 'webserver configs'.
-
if i change on php-fpm_event, blank screen will appear on all domains.
-
Try 'sh /script/fixweb; sh /script/fix-chownchmod; sh /script/restart-web'.
If still not work, inform here 'dir -l /etc/httpd/conf.d'.
-
A. Kloxo-MR: 6.5.0.f-2014102601
B. OS: CentOS release 5.11 (Final) i686
C. Apps:
1. MySQL: mysql55-5.5.41-1.ius.el5
2. PHP: php54-5.4.35-1.ius.el5
3. Httpd: httpd-2.2.29-1.mr.el5
4. Lighttpd: --uninstalled--
5. Nginx: --uninstalled--
6. Qmail: qmail-toaster-1.03-1.3.43.mr.el5
- with: courier-imap-toaster-4.1.2-1.8.7
7. Dns: bind-9.9.5-1.el5
D. Php-type (for Httpd/proxy): php-fpm_event
E. Memory:
total used free shared buffers cached
Mem: 2048 1068 979 0 0 565
// so far .. so good ... no more blank page // one single website doesn't load because of an script wich use fopen i guess.
Still a lot of ram used !!
//[root@vps1 ~]# dir -l /etc/httpd/conf.d
total 144
-rw-r--r-- 1 root root 392 Sep 13 21:12 README
-rw-r--r-- 1 root root 87 Dec 16 14:19 __version.conf
-rw-r--r-- 1 root root 346 Dec 16 20:39 fastcgi.conf
-rw-r--r-- 1 root root 104 Dec 16 20:38 fcgid.conf
-rw-r--r-- 1 root root 17157 Oct 21 00:46 pagespeed.conf
-rw-r--r-- 1 root root 67417 Oct 21 00:46 pagespeed_libraries.conf
-rw-r--r-- 1 root root 104 Dec 16 20:38 php.conf
-rw-r--r-- 1 root root 566 Dec 5 2005 proxy_ajp.conf
-rw-r--r-- 1 root root 104 Dec 16 20:38 proxy_fcgi.conf
-rw-r--r-- 1 root root 308 Dec 16 13:26 rpaf.conf
-rw-r--r-- 1 root root 104 Dec 16 20:38 ruid2.conf
-rw-r--r-- 1 root root 789 Dec 16 14:19 ssl.conf
-rw-r--r-- 1 root root 104 Dec 16 20:39 suphp.conf
-rw-r--r-- 1 root root 352 Apr 25 2012 webalizer.conf
-rw-r--r-- 1 root root 299 Sep 9 2004 welcome.conf
-rw-r--r-- 1 root root 1804 Dec 16 20:42 ~lxcenter.conf
-
If using KVM/XEN/Dedicated server, you can use 'sh /script/clearcache' to remove cached/buffers RAM.
Php-fpm is allocated php children based on user/client amount. It's different with ruid2 where allocated globally. In Kloxo-MR 7, you can allocate php children via panel.
-
upgrading to MR7 ...
-
1st error :
Error in named configuration:
/opt/configs/bind/conf/defaults/named.options.conf:148: unknown key 'rndc-key'
Solutions: comment that line with // & save / restart named .. OK
2nd error
Error 500 on all domains.
Solutions : Fix 'ownership' And 'permissions' // ALL ... OK
3rd error :
Database Error: Unable to connect to the database:The MySQL adapter "mysql" is not available.
Solutions?
-
Use nsd instead bind because less memory usage, faster resolve but with using the same dns configs.
Where you found 'Database Error: Unable to connect to the database:The MySQL adapter "mysql" is not available.' error?.
-
fixed mysql error // after i run sh /script/cleanup
can't login to mailbox now :) ... lots of errror in this panel MRatWork
-
Did you run 'sh /script/upcp -y' after update to Kloxo-MR 7?. If not, try it.
If yes, try 'sh /script/fix-all; sh /script/restart -y'.
-
yes i did follow the procedure to upgrade MR7 // i did ran sh /script/upcp -y // i even run sh /script/fix-all; sh /script/restart -y'
no luck with webmail account // login failed // in logs nothing than this lines
Dec 16 23:33:27 vps1 imap4: 1418765607.478301 INFO: LOGIN FAILED, user=armand, ip=[127.0.0.1]
Dec 16 23:33:32 vps1 imap4: 1418765612.479397 DEBUG: Disconnected, ip=[127.0.0.1], time=5
-
Did you test all webmail applications?.
-
weird ... works ok in thunderbird client ... not working in webmail ...
-
[ later edit ] // in webmail wants user@domain.tld ,,, so far worked only as user / pass
-
*** Process for PHP-FPM service ***
ls: /var/run/php-fpm/*.pid: No such file or directory
Starting php-fpm: [24-Dec-2014 11:24:04] ERROR: failed to chown() the socket '/opt/configs/php-fpm/sock/primaria.titu.sock': Disk quota exceeded (122)
[24-Dec-2014 11:24:04] ERROR: FPM initialization failed
[FAILED]
- Process: reload
Reloading php-fpm: [FAILED]
// again all site have err 500 ...
-
*** Process for PHP-FPM service ***
ls: /var/run/php-fpm/*.pid: No such file or directory
Starting php-fpm: [24-Dec-2014 11:24:04] ERROR: failed to chown() the socket '/opt/configs/php-fpm/sock/primaria.titu.sock': Disk quota exceeded (122)
[24-Dec-2014 11:24:04] ERROR: FPM initialization failed
[FAILED]
- Process: reload
Reloading php-fpm: [FAILED]
// again all site have err 500 ...
It's not related to Kloxo-MR itself but related to free space or inodes of HDD. For hdd usage, test with 'df -h /'
-
root@vps1 configs]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/simfs 60G 33G 28G 54% /
-
Check inode with ' df -a -i -h'
-
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/simfs 4.4M 241K 4.2M 6% /
proc 0 0 0 - /proc
sysfs 0 0 0 - /sys
none 0 0 0 - /dev/pts
none 0 0 0 - /proc/sys/fs/binfmt_misc
-
Try 'sh /script/restart-web -y'.
-
same err
Starting php-fpm: [24-Dec-2014 16:34:05] ERROR: failed to chown() the socket '/opt/configs/php-fpm/sock/primaria.titu.sock': Disk quota exceeded (122)
[24-Dec-2014 16:34:05] ERROR: FPM initialization failed
-
Try 'sh /script/fixweb; sh /script/fixphp; sh /script/restart-web -y'. If still fail, try reboot.
Inform here 'dir -l /etc/php-fpm.d; cat /etc/php-fpm.d/default.conf'.
-
MRatWork : let's talk via messenger : id armand.daniel