I just found out that i could not access my wordpress today, i checked the server, everything looked good. i restarted the server, it’s still slow, there is no error. I decided to do a debug using the following command: cd /www/myswebsite.com/httpdocs/ strace php index.php I see my script stopped at sendmmsg(6, {{{msg_name(0)=NULL, msg_iov(1)=[{“-\265\1\0\0\1\0\0\0\0\0\0\24tech-banker-service”…, 42}], msg_controllen=0, msg_flags=MSG_DONTROUTE|MSG_DONTWAIT|MSG_FIN|MSG_SYN|MSG_ERRQUEUE|MSG_NOSIGNAL|MSG_FASTOPEN|0x6a80010}, 42}, {{msg_name(0)=NULL, msg_iov(1)=[{“\207E\1\0\0\1\0\0\0\0\0\0\24tech-banker-service”…, 42}], msg_controllen=0, msg_flags=MSG_OOB|MSG_DONTROUTE|MSG_CTRUNC|0x10}, 42}}, 2, MSG_NOSIGNAL) = 2 poll([{fd=6, events=POLLIN}], 1, 5000) = 1 ([{fd=6, revents=POLLIN}]) ioctl(6, FIONREAD, [58]) = 0 recvfrom(6, “-\265\201\200\0\1\0\1\0\0\0\0\24tech-banker-service”…, 2048, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr(“213.133.99.99”)}, [16]) = 58 poll([{fd=6, events=POLLIN}], 1, 4999) = 1 ([{fd=6, revents=POLLIN}]) ioctl(6, FIONREAD, [135]) = 0 recvfrom(6,Read More →

The folder /etc/cron.d/ is used to store all cronjobs, the cronjob is saved on the file , the format is: minute hour day month dayofweek username command_to_run. There might some problems – the syntax is not correct , and the result is that the whole file will be ignore.  I don’t know how to check the syntax , but i can watch to the syslog to see if there is any error. After we edit the file in crontab , the system will reload the cronjob, if there is any error it will throw an error in syslog. So i setup this before editing theRead More →

smartctl is a nice tool to check your hard disk health – it will let you know how many hours your disk have been running , the hard disk serial number, temperature … by default smartctl is not installed by default, it’s in smartmontools package. To make it ready to use, you must install smartmontools apt-get install smartmontools After you install smartmontools you can run this command to check your hard disk health: smartctl –xall /dev/sda Here is a sample: smartctl 6.5 2016-01-24 r4214 [x86_64-linux-4.4.0-28-generic] (local build) Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org === START OF INFORMATION SECTION === Model Family: Toshiba 3.5″Read More →

Check this out: https://www.cloudflare.com/technical-resources/#mod_cloudflare Option 1: Installation from Packages Download the appropriate package to your web server and install it using your operating system’s ‘rpm’ or ‘dkpg’ commands. For RedHat / CentOS / CloudLinux: # yum install glibc.i686 # rpm -i mod_cloudflare-elX.latest.rpm For Debian / Ubuntu: # dpkg -i mod_cloudflare-XXXXX.latest.deb RHEL/CentOS/CloudLinux RHEL/CentOS/CloudLinux 7 (64-bit) RHEL/CentOS/CloudLinux 6 (64-bit) Debian Debian 8 (64-bit) Debian 7 (64-bit) Ubuntu Ubuntu 16.04 (64-bit) Ubuntu 15.10 (64-bit) Ubuntu 15.04 (64-bit)Ubuntu 14.04 (64-bit) Ubuntu 12.04 (64-bit)Read More →

AH00526: Syntax error on line 55 of /etc/apache2/apache2.conf: Invalid command ‘LockFile’, perhaps misspelled or defined by a module not included in the server configuration Action ‘start’ failed. Solutions: Replacing this line LockFile ${APACHE_LOCK_DIR}/accept.lock with this one Mutex file:${APACHE_LOCK_DIR} default in /etc/apache2/apache2.conf solved the problem.Read More →

AH00526: Syntax error on line 5 of /etc/apache2/sites-enabled/awstats.conf: Either all Options must start with + or -, or no Option may. Action ‘start’ failed. The Apache error log may have more information. Solution: Add “+” in front of the options, for example: Options ExecCGI -MultiViews +SymLinksIfOwnerMatch   ==> Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch  Read More →

apex, bare domain ( domain without www) and www.domain.com should point to the same IP. In amazon load balance or some of the cloud solution, they do not provide us a static IP, they provide us a name and asks us to point our domain to their domain. There is no problem with www.domain.com , but we can’t point apex domain (domain.com) to a cname record, it ‘s because the current DNS RFC does not allow this. There are many dns hosting providers customized their DNS to support this feature. If you are using Route53, you can use the script below to monitor the differenceRead More →

I recently had to clone a very large repository through SSH, every time i did i got this error   Cloning into ‘large-repository’… remote: Counting objects: 20248, done. remote: Compressing objects: 100% (10204/10204), done. error: RPC failed; curl 18 transfer closed with outstanding read data remaining fatal: The remote end hung up unexpectedly fatal: early EOF fatal: index-pack failed I could be the connection is bad , i finally fixed by using the commands below: $ git clone [email protected]:large-repository –depth 1 $ cd large-repository $ git fetch –unshallowRead More →

By default Apache only allows upto 150 connections, if the number is over, you will be in the queue. It will look like the server is down. The limit for server is usually configured in the following files: /etc/apache2/apache2.conf /etc/apache2/mods-available/mpm_worker.conf /etc/apache2/mods-available/mpm_prefork.conf This is the content to update:   ServerLimit 600 StartServers 10 MinSpareThreads 75 MaxSpareThreads 250 ThreadLimit 64 ThreadsPerChild 32 MaxRequestWorkers 600 MaxConnectionsPerChild 800  Read More →