Posts Tagged ‘lot’

Speed up WordPress / Joomla CMS and MySQL server on Linux with tmpfs ram file system / Decrease Website pageload times with RAM caching

Wednesday, March 4th, 2015

speed-up-accelerate-wordpress-joomla-drupal-cms-and-mysql-server-with-tmpfs_ramfs_decrease-pageload-times-with-ram-caching
As a WordPress blog owner and an sys admin that has to deal with servers running a lot of WordPress / Joomla / Droopal and other custom CMS installed on servers, performoing slow or big enough to put a significant load on servers
and I love efficiency and hardware cost saving is essential for my daily job, I'm constantly trying to find new ways to optimize Customer Website (WordPress) and rest of sites in order to utilize better our servers and improve our clients sites speed (and hence satisfaction). 

There is plenty of little things to do on servers but probably among the most crucial ones which we use nowadays that save us a lot of money is tmpfs, and earlier (ramfs) – previously known as shmfs).
TMPFS is a (Temporary File Storage Facility) Linux kernel technology based on ramfs (used by Linux kernel initrd / initramfs on boot time in order to load and store the Linux kernel in memory, before system hard disk partition file systems are mounted) which is heavily used by virtually all modern popular Linux distributions. 

Using ramfs (cramfs variation – Compressed ROM filesystem) has been used to store different system environment kernel and Desktop components of many Linux environment / applications and used by a lot of the Linux BootCD such as the most famous (Klaus Knopper's) KNOPPIX LiveCD and Trinity Rescue Kit Linux (TRK uses /dev/shm which btw can be seen on most modern Linux distros and is actually just another mounted tmpfs).
If you haven't tried Live Linux yet try it out as me and a lot of sysadmins out there use some kind of LiveLinux at least few times on yearly basis  to Recover Unbootable Linux servers after some applied remote Updates as well as for Rescuing (Save) Data from Linux server failing to properly boot because of hard disk (bad blocks) failures. As I said earlier TMPFS is also used on almost any distribution for the /dev/ filesystem which is kept in memory.

You can see which tmpfs partitions is used on your Linux server with:

 

debian-server:~# mount |grep -i tmpfs
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)

 

Above is an output from a standard Debian Linux server. On CentOS 7 standard mounted tmpfs are as follows:

 

[root@centos ~]# mount |grep -i tmpfs
devtmpfs on /dev type devtmpfs (rw,nosuid,seclabel,size=1016332k,nr_inodes=254083,mode=755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,seclabel)
tmpfs on /run type tmpfs (rw,nosuid,nodev,seclabel,mode=755)
tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,seclabel,mode=755)

 

[root@centos ~]# df -h|grep -i tmpfs
devtmpfs                 993M     0  993M   0% /dev
tmpfs                   1002M   92K 1002M   1% /dev/shm
tmpfs                   1002M  8.8M  993M   1% /run
tmpfs                   1002M     0 1002M   0% /sys/fs/cgroup

The /run tmpfs mounted directory is also to be seen also on latest Ubuntus and Fedoras and is actually the good old /var/run ( where applications keep there pids and some small app related files) stored in tmpfs filesystem stored in memory.

If you're wondering what is /dev/shm and why it appears mounted on every single Linux Server / Desktop you've ever used this is a special filesystem shared memory which various running programs (processes) can use to transfer data quick and efficient between each other to preven the slow disk swapping. People using Linux for the rest 15 years should remember /dev/shm has been a target of a lot of kernel exploits as historically it had a lot of security issues.

While writting this article I've just checked about KNOPPIX developed amd just for info as of time of writting this distro has already 1000+ programs on CD version and 2600+ packages / application on DVD version.
Nowadays Knoppix is mostly used mostly as USB Live Flash drive as a lot of people are dropping CD / DVD use (many servers doesn't have a CD / DVD Drive) and for USB Live Flash Linux distros tmpfs is also key technology used as this gives the end user an amazing fast experience (Desktop applications run much fasten on Live USBs when tmpfs is used than when the slow 7200 RPM HDDs are used).

Loading big parts of the distribution within RAM (with tmpfs from Linux Kernel 2.4+ onwards) is also heavily used by a lot of Cluster vendors in most of Clustered (Cloud) Linux based environemnts, cause TMPFS gives often speeds up improvements to x30 times and decreases greatly I/O HDD. FreeBSD users will be happy to know that TMPFS is already ported and could be used on from FreeBSD 7.0+ onward.

In this small article I will give you example use on how I use tmpfs to speed up our WordPress Websites which use WP Caching plugins such as W3 Total Cache and WP Super Cache
and Hyper Cache / WP Super Cache disk caching and MySQL server as a Database backend.
Below example is wordpress specific but since it can be easily applied to JoomlaDrupal or any other CMS out there that uses mySQL server to make a lot of CPU expensive memory hungry (LEFT JOIN) queries which end up using a slow 7200 RPM hard disk.


 

1. Preparing tmpfs partitions for WordPress File Cache directory
 

If you want to give tmpfs a test drive, I recommend you try to create / mount a 20 Megabyte partition. To create a tmpfs partition you don't need to use a tool like mkfs.ext3 / mkfs.ext4 as TMPFS is in reality a virtual filesystem that is mapped in the server system physical RAM (volatile memory). TMPFS is very nice because if you run out of free RAM system starts a combination of RAM use + some Hard disk SWAP 
The great thing about TMPFS is it never uses all of the available RAM and SWAP, which would not halt your server if TMPFS partition gets filled, but instead you will start getting the usual "Insufficient Disk Space", just like with a physical HDD parititon. RAMFS cares much less about server compared to TMPFS, because if RAMFS is historically older.

ramfs file systems cannot be limited in size like a disk base file system which is limited by it’s capacity, thus ramfs will continue using memory storage until the system runs out of RAM and likely crashes or becomes unresponsive. This is a problem if the application writing to the file system cannot be limited in total size, so in my opinion you better stay away from RAMFS except you have a good idea what you're doing. Another disadvantage of RAMFS compared to TMPFS is you cannot see the size of the file system in df and it can only be estimated by looking at the cached entry in free.

Note that before proceeding to use TMPFS or RAMFS you should know besides having advantages, there are certain serious disadvantage that if the server using tmpfs (in RAM) to store files crashes the customer might loose his data, therefore using RAM filesystems on Production servers is best to be used just for caching folders which are regularly synchronized with (rsync) to some folder to assure no data will be lost on server reboot or crash.

Memory of fast storage areas are ideally suited for applications which need repetitively small data areas for caching or using as temporary space such as Jira (Issue and Proejct Tracking Software) Indexing  As the data is lost when the machine reboots the tmpfs stored data must not be data of high importance as even scheduling backups cannot guarantee that all the data will be replicated in the even of a system crash.

To test mounting a tmpfs virtual (memory stored) filesystem issue:
 

mount -t tmpfs tmpfs -o size=256m /mnt/tmpfs


If you want to test mount a ramfs instead:

 

 mount -t ramfs -o size=256m ramfs /mnt/ramfs

 

debian-server:~#  mount |grep -i -E "ramfs|tmpfs"
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /mnt/tmpfs type tmpfs (rw,size=256m)
ramfs on /mnt/ramfs type tmpfs (rw,size=256m)

 

Once mounted tmpfs can be used in the same way as any ext4 / reiserfs filesystem. In the same way to make mounts permanent, its necessery to add a line to /etc/fstab

To illustrate better a tmpfs use case on my blog running WordPress with W3TotalCache (W3TC) plugin cache folder in /var/www/blog/wp-content/w3tc to get advantage of tmpfs to store w3tc files.

a) Stop Apache

On Debian
 

debian-server:~# /etc/init.d/apache stop


On CentOS 
 

[root@centos ~]# /etc/init.d/httpd stop


b) Move w3tc dir to w3tc-bak

 

debian-server:~# cd /var/www/blog/wp-content/
debian-server:~# mv w3tc w3tc-bak

 

c) Create w3tc directory
 

debian-server:/var/www/blog/wp-content# mkdir w3tc
debian-server:/var/www/blog/wp-content# chown -R www-data:www-data w3tc


d) Add tmpfs record to /etc/fstab

My W3TC Cache didn't grow bigger than 2Gigabytes so I create a 2Giga directory for it by adding following in /etc/fstab 
 

debian-server:~# vim /etc/fstab

 

tmpfs /var/www/blog/wp-content/w3tc tmpfs defaults,size=2g,noexec,nosuid,uid=33,gid=33,mode=1755 0 0


You might also want to add the nr_inodes (option) to tmpfs while mounting. nr_inodes is the maximum inode for instance. Default is half the number of your physical RAM pages, (on a machine with highmem) the number of lowmem RAM page, some common option that should work is nr_inodes=5k, if you're unsure what this option does you can safely skip it 🙂

e) Mount new added tmpfs folder

Then to mount the newly added filesystem issue:
 

mount -a


Or if you're on a CentOS / RHEL server use httpd Apache user instead and whenever you have docroot and wordpress installed.

 

[root@centos ~]# chown -R apache:apache: w3tc


If you're using Apache SuPHP use whatever the UID / GID is proper.

On CentOS you will need to set proper UID and GID (UserID / GroupID), to find out which ones to to use check in /etc/passwd:
 

[root@centos ~]# grep -i apache /etc/passwd
apache:x:48:48:Apache:/var/www:/sbin/nologin


f) Move old w3tc cache from w3tc-bak to w3tc

 

debian-server:/var/www/blog/wp-content# mv w3tc-bak/* w3tc/

 

g) Start again Apache

On Debian:

 

debian-server:~# /etc/init.d/apache2 start

 


On CentOS:
 

[root@centos~]# /etc/init.d/httpd start

h) Keeping w3tc cache site folder synced

As I said earlier the biggest problem with caching (the reason why many hosting providers) and site admins refuse to use it is they might loose some data, to prevent data loss or at least mitigate the data loss to few minutes intervals it is a good idea to synchronize tmpfs kept folders somewhere to disk with rsync.

To achieve that use a cronjob like this:
 

debian-server:~# crontab -u root -e
*/5 * * * * /usr/bin/ionice -c3 -n7 /usr/bin/nice -n 19 /usr/bin/rsync -ah –stats –delete /var/www/blog/wp-content/w3tc/ /backups/tmpfs/cache/ 1>/dev/null


Note that you will need to have the /backups/tmpfs/cache folder existing, create it with:

 

debian-server:~# mkdir -p /backups/tmpfs/cache


You will also need to add a rsync synchronization from backupped folder to tmpfs (in case if the server gets accidently rebooted because it hanged or power outage), place in

/etc/rc.local

 

ionice -c3 -n7 nice -n 19 rsync -ahv –stats –delete /backups/tmpfs/cache/ /var/www/blog/wp-content/w3tc/ 1>/dev/null


(somewhere before exit 0) line
 

0 05 * * * /usr/bin/ionice -c3 -n7 /bin/nice -n 19 /usr/bin/rsync -ah –stats –delete /var/www/blog/wp-content/w3tc/ /backups/tmpfs/cache/ 1>/dev/null

 

 

2. Preparing tmpfs partitions for MySQL server temp File Cache directory


Its common that MySQL servers had to serve a lot of long and heavy SQL JOIN Queries mostly by related posts WP plugins such as (Zemanta Related Posts) and Contextual Related posts though MySQLs are well optimized  to work as much as efficient using mysql tuner (tuning primer) still often SQL servers get a lot of temp tables created to disk (about 25% to 30%) of all SQL queries use somehow HDD to serve queries and as this is very slow and there is file lock created the overall MySQL performance becomes sluggish at times to fix (resolve) that without playing with SQL code to optimize the slow queries the best way I found is by using TMPFS as MySQL temp folder.

To do so I create a TMPFS usually the size of 256 MB because this is usually enough for us, but other hosting companies might want to add bigger virtual temp disk:

a) Add tmpfs new dir to /etc/fstab

In /etc/fstab add below record with vim editor:
 

debian-server:~# vim /etc/fstab

 

tmpfs /var/mysqltmp tmpfs rw,gid=111,uid=108,size=256M,nr_inodes=10k,mode=0700 0 0

 

Note that the uid / and gid 105 and 114 are taken again from /etc/passwd

On Debian

debian-server:~# grep -i mysql /etc/passwd
mysql:x:108:111:MySQL Server,,,:/var/lib/mysql:/bin/false


On CentOS
 

[root@centos ~]# grep -i mysql /etc/passwd
mysql:x:27:27:MySQL Server:/var/lib/mysql:/bin/bash


b) Create folder /var/mysqltmp or whenever you want to place the tmpfs memory kept SQL folder

 

debian-server:~# mkdir /var/mysqltmp
debian-server:~# chown mysql:mysql /var/mysqltmp

 

debian-server:~# mount|grep -i tmpfs
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /var/www/blog/wp-content/w3tc type tmpfs (rw,noexec,nosuid,size=2g,uid=33,gid=33,mode=1755)
tmpfs on /var/mysqltmp type tmpfs (rw,gid=108,uid=111,size=256M,nr_inodes=10k,mode=0700)


c) Add new path to tmpfs created folder in my.cnf 

Then  edit /etc/mysql/my.cnf

 

debian-server:~# vim /etc/mysql/my.cnf

[mysqld]
#
# * Basic Settings
#
user        = mysql
pid-file    = /var/run/mysqld/mysqld.pid
socket      = /var/run/mysqld/mysqld.sock
port        = 3306
basedir     = /usr
datadir     = /var/lib/mysql
tmpdir      = /var/mysqltmp

 

On CentOS edit and change tmpdir in same way within /etc/my.cnf


d) Finally Restart Apache and MySQL to make mysql start using new set tmpfs memory kept folder

On Debian:
 

debian-server:~# /etc/init.d/apache2 stop; /etc/init.d/mysql restart; /etc/init.d/apache2 start

On CentOS:
 

[root@centos ~]# /etc/init.d/httpd stop; /etc/init.d/mysqld restart; /etc/initd/httpd start


Now monitor your server and check your pagespeed increase for me such an optimization usually improves site performance so site becomes +50% faster, to see the difference you can test your website before applying tmpfs caching for site and after that by using Google PageInsight (PageSpeed) Online Test. Though this example is for MySQL and WordPress you can easily adopt the same for Joomla if you have Joomla Caching enabled to some folder, same goes for any other CMS such as Drupal that can take use of Disk Caching. Actually its a small secret of many Hosting providers that allow clients to create sites via CPanel and Kloxo this tmpfs optimizations are already used for sites and by this the provider is able to offer better website service on lower prices. VPS hosting providers also use heavy caching. A lot of people are using TMPFS also to accelerate Sites that have enabled Google Pagespeed as Cacher and accelerator, as PageSpeed module puts a heavy HDD I/O load that can easily stone the server. Many admins also choose to use TMPFS for  /tmp, /var/run, and /var/lock directories as this leads often to significant overall server services operations improvement.
Once you have tmpfs enabled, It is a good idea to periodically monitor your SWAP used space with (df -h), because if you allocate bigger tmpfs partitions than your physical memory and tmpfs's full size starts to be used your machine will start swapping heavily and this could have a very negative performance affect.
 

debian-server:~# df -h|grep -i tmpfs
tmpfs            3,9G     0   3,9G   0% /lib/init/rw
tmpfs            3,9G     0   3,9G   0% /dev/shm
tmpfs            2,0G  1,4G   712M  66% /var/www/blog/wp-content/w3tc
tmpfs            256M     0   256M   0% /mnt/tmpfs
tmpfs            256M  236K   256M   1% /var/mysqltmp

The applications of tmpfs to accelerate services is up to your imagination, so I will be glad to hear from other admins on any interesting other application or problems faced while using TMPFS.

 Enjoy! 🙂

Life going nowhere …

Sunday, September 23rd, 2007

Meaningless_life-picture

Seems, My life is going nowhere. Today I drinked half of a bottle of Wine and 1 beer. I was out with Alex. We drinked in the city park. Through the day I started my first bsd jail using a tutorial online. I smoked a lot of cigarettes and I want to stop them again. Most of the people I met are not a good company for me that's what I'm thinking more and more. Also I'm thinking more and more I have to change my living place. If only I could find the love of my life … We moved bookshelf and stuff from our room ( My mother again has decided to make repairs in our room. ). I'm asking myself why shall I live a meaningless life. At least my interest into computers and computing started to appear again (this is cool). My faith is really going away since I pray and pray for something .. and I don't receive it ( Or at least I don't see it). I'm tired of waiting. I need to have this physical healing to continue my normal life. I'm not proud of me I was a little aggressive when we was in the Mino's coffee before an hour or so … Now I intend to watch another episode of stargate SG1. And to go to the DreamLand. If only I could live into a Dreamland all the time. I'm starting to realize I should change the music I listen, I should change a lot of my behaviours If I want to have a new and happy life. Autumn is a beautiful Season 🙂 The autumn rain shall come and restore us :)END—–

The Celebration of the feast of the temple Holy Trinity

Thursday, June 25th, 2009

Just few weeks ago it was the feast of our temple here in Dobrich the holy triniy. For this event a lot of priests either from Dobrich and the district as well as the Metropolit Kiril of Varna. Father Veliko has insisted to ordain me with a church rank. The church rank I received grants me oportunity to enter the holy altar and help in the church services (the holy liturgies). My sister has captured a couple of snapshots both video and pictures the pictures I’ve upload and can be seen

Remove URL from comments in WordPress Blogs and Websites to mitigate comment spam URLs in pages

Friday, February 20th, 2015

remove-comment-spam-url-field-wordpress-website-or-blog-working-how-to
If you're running a WordPress blog or Website where you have enabled comments for a page and your article or page is well indexing in Google (receives a lot of visit / reads ) daily, your site posts (comments) section is surely to quickly fill in with a lot of "Thank you" and non-sense Spam comments containing an ugly link to an external SPAM or Phishing website.

Such URL links with non-sense message is a favourite way for SPAMmers to raise their website incoming (other website) "InLinks" and through that increase current Search Engine position. 

We all know a lot of comments SPAM is generally handled well by Akismet but unfortunately still many of such spam comments fail to be identified as Spam  because spam Bots (text-generator algorithms) becomes more and more sophisticated with time, also you can never stop paid a real-persons Marketers to spam you with a smart crafted messages to increase their site's SEO ).
In all those cases Akismet WP (Anti-Spam) plugin – which btw is among the first "must have"  WP extensions to install on a new blog / website will be not enough ..

To fight with worsening SEO because of spam URLs and to keep your site's SEO better (having a lot of links pointing to reported spam sites will reduce your overall SEO Index Rate) many WordPress based bloggers, choose to not use default WordPress Comments capabilities – e.g. use exnternal commenting systems such as Disqus – (Web Community of Communities), IntenseDebate, LiveFyre, Vicomi

However as Disqus and other 3rd party commenting systems are proprietary software (you don't have access to comments data as comments are kept on proprietary platform and shown from there), I don't personally recommend (or use) those ones, yes Disqus, Google+, Facebook and other comment external sources can have a positive impact on your SEO but that's temporary event and on the long run I think it is more advantageous to have comments with yourself.
A small note for people using Disqos and Facebook as comment platforms – (just imagine if Disqos or Facebook bankrupts in future, where your comments will be? 🙂 )

So assuming that you're a novice blogger and I succeeded convincing you to stick to standard (embedded) WordPress Comment System once your site becomes famous you will start getting severe amount of comment spam. There is plenty of articles already written on how to remove URL comment form spam in WordPress but many of the guides online are old or obsolete so in this article I will do a short evaluation on few things I tried to remove comment spam and how I finally managed to disable URL link spam to appear on site.
 

1. Hide Comment Author Link (Hide-wp-comment-author-link)

This plugin is the best one I found and I started using it since yesterday, I warmly recommend this plugin because its very easy, Download, Unzip, Activate and there you're anything typed in URL field will no longer appear in Posts (note that the URL field will stay so if you want to keep track on person's input URL you can get still see it in Wp-Admin). I'm using default WordPress WRC (Kubrick), but I guess in most newer wordpress plugins is supposed to work. If you test it on another theme please drop a comment to inform whether works for you.  Hide Comment Author Link works on current latest Wordpress 4.1 websites.

A similar plugin to hide-wp-author-link that works and you can use is  Hide-n-Disable-comment-url-field, I tested this one but for some reason I couldn't make it work.

wordpress-remove-delete-hide-n-disable-url-comment-without-deleting-the-form-url-field-screenshot-reduce-comment-spam
Whatever I type in Website field in above form, this is wiped out of comment once submitted 🙂
 

2. Disable hide Comment URL (disable-hide-comment-url)

I've seen reports disable-hide-comment-url works on WordPress 3.9.1, but it didn't worked for me, also the plugin is old and seems no longer maintaned (its last update was 3.5 years ago), if it works for you please please drop in comment your WP version, on WP 4.1 it is not working.

disable-hide-comment-url-screenshot-plugin-to-disable-comment-url-spam-in-wordpress-sites
 


3. WordPress Anti-Spam plugin

WordPress Anti-Spam plugin is a very useful addition plugin to install next to Akismet. The plugin is great if you don't want to remove commenter URL to show in the post but want to cut a lot of the annoying Spam Robots crawling ur site.
 

Anti-spam plugin blocks spam in comments automatically, invisibly for users and for admins.

  • no captcha, because spam is not users' problem
  • no moderation queues, because spam is not administrators' problem
  • no options, because it is great to forget about spam completely

Plugin is easy to use: just install it and it just works.

Anti bot works fine on WP 4.1

4. Stop Spam Comments

Stop Spam Comments is:

  • Dead simple: no setup required, just activate it and enjoy your spam-free website.
  • Lightweight: no additional database queries, it doesn't add script files or other assets in your theme. This means your website performance will not be affected and your server will thank you.
  • Invisible by design: no captchas, no tricky questions or any other user interaction required at all.
     

Stop Spam Comments works fine on WP 4.1.

I've mentioned few of the plugins which can help you solve the problem, but as there are a lot of anti-spam URL plugins available for WP its up to you to test and see what fits you best. If you know or use some other method to protect yourself from Comment Url Spam to share it please.

Import thing to note is it usually a bad idea to mix up different anti-spam plugins so don't enable both Stop Spam Comments and WordPress Anti Spam plugin.

5. Comment Form Remove Url field Manually 

This (Liberian) South) African blog describes a way how to remove URL field URL manually

In short to Remove Url Comment Field manually either edit function.php (if you have Shell SSH access) or if not do it via Wp-Admin web interface:
 

WordPress admin page –> Appearance –> Editor


Paste at the end of file following PHP code:

 

add_filter('comment_form_default_fields', 'remove_url');
 function remove_url($fields)
 {
 if(isset($fields[‘url’]))
 unset($fields[‘url’]);
 return $fields;
 }


Now to make changes effect, Restart Apache / Nginx Webserver and clean any cache if you're using a plugin like W3 Total Cache plugin etc.

Other good posts describing some manual and embedded WordPress ways to reduce / stop comment spam is here and here, however as it comes to my blog, none of the described manual (code hack) ways I found worked on WordPress v. 4.1.
Thus I personally stuck to using Hide and Disable Comment URL plugin  to get rid of comment website URL.

Fix MySQL connection error – Host ” is blocked because of many connection errors; unblock with ‘mysqladmin flush-hosts’

Wednesday, July 2nd, 2014

fix-mysql-too-many-connection-errors-explained

If you get a MySQL error like:

Host '' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'

This most likely means your PHP / Java whatever programming language application connecting to MySQL is failing to authenticate with the application created (existing) or that the application is trying too many connections to MySQL in a rate where MySQL server can't serve all the requests.

Some common errors for Too many Connection errors are:
 

  • Networking Problem
  • Server itself could be down
  • Authentication Problems
  • Maximum Connection Errors allowed.

The value of the max_connection_errors system variable determines how many successive interrupted connection requests are permitted to myqsl server.
 

Well anyways if you get the:

Host '' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'

You can consider this a sure sign application connections to MySQLis logging a lot of error connections, for some reason.
This error could also appear on very busy websites where high amount of separete connections are used – I've seen the error occur on PHP websites whether mysql_pconnect(); is selected in favour of the prooved working mysql_connect();

The first thing to do before changing / increasing default set of max connection errors is to check how many max connection errors are set within MySQL?

For that connect with MySQL CLI and issue:
 

mysql> SHOW VARIABLES LIKE '%error%';


+——————–+————————————————————-+
| Variable_name      | Value                                                           |
+——————–+————————————————————-+
| error_count        | 0                                                                     |
| log_error          | /var/log/mysql//mysqld.log                                |
| max_connect_errors | 10000                                                      |
| max_error_count    | 64                                                               |
| slave_skip_errors  | OFF                                                             |
+——————–+————————————————————-+


A very useful mysql cli command in debugging max connection errors reached problem is

mysql> SHOW PROCESSLIST;

 

To solve the error, try to tune in /etc/my.cnf, /etc/mysql/my.cnf or wherever my.cnf is located:

[mysqld]
max_connect_errors
variable

and

wait_timeout var. Some reasonable variable size would be:

max_connect_errors = 100000
wait_timeout = 60

If such (anyways) high values is still not high enough you can raise mysql config connection timeout

 

to

max_connect_errors = 100000000

Also if you want to try raise max_connect_errors var without making it permanenty (i.e. remember var setting after MySQL service restart), set it from MySQL cli with:

SET GLOBAL max_connect_errors


If you want to keep the set default max_connection_errors and fix it temporary, you can try to follow the error

Host '' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'

suggestion and issue in root console:

mysqladmin flush-hosts

Same could also be done from MySQL Cli with cmd:
 

FLUSH HOSTS;

Happy Sysadmin day! – Last Friday of July – The day of the system administrator

Friday, July 25th, 2014

Its-SysAdminDay-SAD-day-the-day-of-the-system-administrtator-cake-hooray

Every Last Friday of July is System Administrator's day. This relatively new technocrat tradition started as suggested by the system administrator Ted Kekatos in 2000.

SysAdmin Day or (SAD) 🙂 as it is also famous is a day to appreciate the achieviments of anyone seriously involved in IT industry. Now is time to say SAD day is not a day for programmers to celebrate as there is separate Programmer's day / Day of the Programmer feast or (DOP / DOPE ) 🙂 that is celebrated on the 256th (hexadecimal 100th, or the 28th) day of each year (September 13 during common years and on September 12 in leap years).

System Administrator Appreaciation Day – (SAAD) was historically inspired by Hewlett Packard magazine advertisement in which a system administrator is presented with flowers and fruit-baskets by grateful co-workers as thanks for installing new printers.

 

DOPE's started as proposed by Valentin Balt and Michael Cherviakov, employees of Parallel Technologies (a software company). In 2002, they tried to gather signatures for a petition to the government of Russia to recognize the day as the official programmers' day.


The modern usual way to celebrate Sysadm day is to get your system administrator a day. If you're at poisition to administrate a couple of hundreds of Windows hosts, you can send a prank message to your colleagues reminding them to buy you a beer or mass mail / set a Outlook Meeting reminder that system administrators – doesn't drink flowers and chocolate 🙂

 

A Day In The Life Of A SAN Administrator

Since 2000, a lot of UNIX / Linux sysadmins and  geeks tend to organize gatherings and Free Software celebration meetings on the SAD day.

SysAdminDay has inspired plenty of other pranky novels and music to glorify the remarkable event 🙂

Here are few to cheer you up.

System Administrator's Day song

Sysadmin day (Karaoke) song


Here are also some PoC for some weird ways to celebrate the day of the system administrator 🙂

System Administrator's Day in Russia Remix
 


HAPPY SYSTEM ADMINISTRATOR DAY – HOORAY ! 🙂

Religulous – An Atheist movie preaching false ideas about Christianity – Religulous Orthodox Christian perspective

Thursday, July 31st, 2014

Religulous-anti-Christian-movie-Psalm-14-vers-1-the-fool-said-in-his-heart-there-is-no-God
Most of my colleagues at work know I am Christian and as we have our lunch  together almost daily, have a friend talks in our rest time etc. … it is quite normally we have talks on topic of philosophy and religion.

Most of them (like a lot of IT people have atheistic views as most people nowdays, even though I'm sure they believe deep in their hearts in good and wait / search for God's salvation and mercy.)
In that short talks often, I've been pranked, questioned and probably even thought crazy for believing in the Lord Jesus Christ and the Holy Gospel. That's okay as this is normal as in almost all ages Christians, were mocked for their faith by skeptics and disbelievers.

In our talks often, my colleagues try to convince me their believe "There is no God" and they think in a way that religion is only for old fashioned and stupid people, because they think the modern dilusion that science and religion are controversial.
Since some time one of my colleague tells me about an atheistic movie of an atheist who made a movie called Religulous. After, I've been told about the movie about 5 times, I decided to spend some and research on it, because I firmly believe it is the next "holywood" style easily digestable movie made "the holywood way". Below is my rationalization and findings about the movie.

The movie title Religulous is selected as a prank from the word "Ridiculous". Before you further read I warn you if you're an Orthodox Christian to not watch it for it is not worthy to spend 1:40 minutes of your wife watching such a nonsense.

Religulous is American documentary film from 2008, directed by Larry Charles and starring comedian Bill Maher. In the Movie Bill Maher travels to different religion holy places (Jerusalem, Vatican, Salt Lake city) and pranks interviewing believers from variety of religions believes. Uneasy questions misleading questions are asked to different people and he makes prank of answers. Of course it is very easy to make someone a fool who doesn't have idea about basics of world religions and present your arguments in a convincing way among people who doesn't have deep understanding on Christianity branches and history.

If one takes a quick time to research on who is Bill Maher, he finds he is a ardently liberal who has deep disrespect and hate for Christianity based on a personal bitter experience in Catholicism (curiously his mother is Jewish) and one finds Maher disregards Christianity not based on facts but on personal bitter experiences from Roman Catholicism.
In religulous it is preached, that religion must die to liberate the family from unneeded slavery which is pretty much what the communists in the bolshevik revolution believed – meaning his idea is nothing new but rebranded atheism. Just for information, there were people with such hatred and ideas during the last 2000 years, so somehow this guy, reinvents the steel.

In the movie Maher travels the world with director of  Borat Cultural Learnings of America for  Make benefit Glorious notion of Khazakstan – Larry Charles (which is another mockery "commedy" movie).
Even by reading IMDB movie description gives you idea the movie is not serious and it is highly ridiculous to use such non-sense to attack Christianity, along which civilization gravitated and thanks to which we have a well developed modern civilization.  What Maher claims is about  1/3 of population on earth – 2.5 billion are stupid and inferior to atheists).

Here is IDMB's storyline quote:

Bill Maher interviews some of religion's oddest adherents. Muslims, Jews and Christians of many kinds pass before his jaundiced eye. Maher goes to a Creationist Museum in Kentucky, which shows that dinosaurs and people lived at the same time 5000 years ago. He talks to truckers at a Truckers' Chapel. (Sign outside: "Jesus love you.") He goes to a theme park called Holy Land in Florida. He speaks to a rabbi in league with Holocaust deniers. He talks to a Muslim musician who preaches hatred of Jews. Maher finds the unlikeliest of believers and, in a certain Vatican priest, he even finds an unlikely skeptic.

It is obvious from this description that the movie is not to consider serious and what the people on this movie would say is not to be considered authoritative as they're not even theologians, but random people. Also what Maher did in this movie is to select weak and mixed people to mock intentionally Christianity.

Even though in the movie various religions are mocked the accent of his mockery is christianity and this is not a coincidense but because, Christianity has most adherents.
The movie is highly manipulative, just like another openly anti-Christian movie Zeitgeist.
The guy opens the movie with a scene on Megiddo, Israel with a false claim that the end of the world is going to happen on this place.

I have heard some protestant Christians took Revalation chapter of Holy Bible and interpret the written there about an End of the World all world armies battle. Actually I'm not aware that this idea is ever preached by any orthodox Christian priest, monk or elder but it is more a "free interpretation" of the holy scriptures by some protestant denomination.
Actually an interesting thing about Megiddo is on Megiddo is located the earliest Christian Church, so I guess it is a not a coincidense movie criticism starts from there. The first half of the film is mostly focused on evangelical Christians, how they believe in things like a 5,000-year-old earth, etc. Maher takes a trip to the Creation Museum in Hebron, Kentucky, where he interviews creationism guru Ken Ham against the backdrop of animatronic dinosaurs with saddles (for humans to ride on).
And he also interviews young-earth evangelical Mark Pryor, a democratic senator from Arkansas who creates some of the funniest moments of the film. To be fair, Maher also interviews Christian evolutionist Francis Collins, but he too comes out looking a bit buffoonish.

All along the journey, Maher and Charles jazz up the images with achingly sardonic voiceovers and music, and some very clever quick-cut editing (inserting 2 seconds of Charlton Heston-as-Moses at opportune moments, for example).

To show off his openness Maher, smokes pot on camera obviously preaching "freedom" the american way and live quickly and die rock'n'roll culture message. The movie is quite agressive and made in a way to make converts. The movie presents the so called self-fulfilling prophecies, believed and preached by people involved into experimental psychology (which nowdays uses early occult and shamanistic magical methods and whose practices are not based on science but on believe).

Of course to make such a movie look authentic, any connection with real historic facts in the movie are omitted.

Maher's thesis that all things evil and destructive are a result of religious delusion simply does not hold water historically!
There are already thousands of recent proofs, that lack-of religion is not panacea for all problems, take for example communism in Russia and the disbandlement of the USSR, Communistic China and the countraless atheistic regimes throughout history leading to violence and calamity in the world, totally outside of any religious motivation.

To make the non-sense movie more fun and convincing, the psychologic method of mockery is heavily used,  everything in the movie is presented in a commedy form.

Religulous a movie meant to make religious people look stupid, to "prove" that religious belief and intelligence are mutually exclusive.

Maher spends the second half of the film undermining religions and cults of every shape and size. He goes to Utah and skewers Mormonism, interviews Puerto Rican cult leader Jose Luis De Jesus Miranda (who claims to be the Antichrist), and even gets high with a leader of a religion based around marijuana. He goes to the Vatican and interviews some crazy Catholic priest, and Jerusalem to deconstruct Judaism and Islam. Maher is particularly hard on Islam, offering somewhat surprising pronouncements about the inherent violence and barbarism of that most touchy of all world religions. At moments like these, Maher might actually find allies in conservative Christian circles??

In the movie, during a debate with a Christian, Maher repeats a version of Christ myth theory derived from Gerald Massey's 1907 thesis that the myth of the Egyptian deity Horus was the source of the story of Jesus. He makes riduculous connection between the Book of the Dead and Jesus Christ.

It is pretty interesting that we Christians are often being blamed for evangelism and because of that most of Christians, fear to talk about their faith, just because true Christian faith and modern society living in confort does not align well together.

The inner essence of man is very similar in both atheists, christian, muslims, jewish, buddhists hindu etc. we are all looking for a higher meaning in life sooner or later in life. We all live by certain believes daily (I know atheists would ignore it but, a lot of the actions even the hardest atheist takes are pushed by certain belief system and faith in something (disbelieve in God is also a faith just like believe in God). Actually being an atheist is a tough thing, because atheists just like us christians spend time to reinforce their disbelieve with, stories, question and answer sessions, scientific facts.

Most of atheists fall in the trap of disbelieve either because they're dishonest in their research on is there God? or because events in their life turned in a way they didn't wanted too (because of lack of what saints call humility) or because they want to justify their bad deeds. Anyways for good or bad most of people who define themselves as atheists and follow the "spiritual wind of the times" are nowadays living in the well developed high economies world and it is interesting that in this parts of the world, people have as heritage to live with general Christian mentality and Christian mindset. Christian understanding of life in most countries full of atheists is so strongly rooted in society and culture, so even the biggest anti-christ or atheist has a tendency to do goo. That a lot of those atheists who disbelieve God actually do Christiain deeds not realizing a lot of their deeds paradoxally are deeds of people who actually believe there is God.

I've noticed there are at least 3 types of atheists:

  • Passive
  • Indifferent
  • Militant (Active)

My personal observations on Atheism (as an ex-atheist), is that atheists have minimal or wrong understanding on different religions and know nothing about Orthodox Christianity and most even didin't hear about its existence, from the movie I got the impression Maher also doesn't have

I think it is not righteous to criticize Christianity without even taking full time to study it. As Orthodox Christianity is hard to grasp and unpopular faith, often the image of modern Christian is made up by protestant Church denominations and even in best cases by Roman Catholic church, so most people in even officially christian protestant / catholic countries does not have the opportunity to see true Christian ascetic faith which is still present in the Orthodox Church.

The most common attack of an atheist against Christianity is using arguments about the Roman Catholic's Crusades and Inquisition, which were conducted by the Roman Catholic Church. Most Atheists however does not knowthat in Orthodox Church, there was no inquisition and no Crusades.
Even worse Roman Catholic crusaders came and invaded and killed orthodox christians in the same way they killed anyone who rejected to accept their faith, this act never happened in Orthodox Church.

Passive and indifferent atheists often, keep calm and either haven't thought whether there is God or don't take position when one talks about faith.
Often passive and indifferent atheists are amazed to learn things pointing them that there is God and that the holy writtings are true.

The Militant (active) atheist is a rare thing to see nowadays as people are tought to be tolerant and respectful to others, however if you start talking on topic that has to deal with faith, somehow a lot of atheists start being agressive and blame you and your faith for responsible for all the evils that happened in the world.

Often active atheists are such because of some personal problem or disappointed connected to Christianity just like Maher. 
Maher and other atheists like him start developing blaming attitude to the Lord and the Church. The fact that Christianity doesn't fit someone's desires doesn't mean it is true.

In the movie one sees quite of crazy people and religious leaders, which are either uninformed about their faith or suffer from some mental problems, as with most movies to discredit Christianity, Orthodox Christianity stand point on faith is not shown. Maher suggests, as a alternative method to faith, the method of doubt actually by creating such a movie with the aim to discredit religion, he demonstrates totally the opposite, as all his findings are based on his personal faith that "There is no God" and Christianity is based on fairy-tales.

Faith has difficulties, there are a lot of sick people in the Church, things are not ideal in christian-dome, and we have to be careful not to believe or follow blindly everything we hear, but I think Maher's attitude is seriously disrespectful to things and people's believe.

In the movie, a lot of the people to be interviewed were radical and the movie makes an image of Christianity as very radical, but Maher and his movie is just like as radical as them. It is fact that there is radical things in many of protestant christian denominations and many start-up (newly believed) Christians, have the tendency to be radical, however to make his point solid  I think, Maher should have interviewed stable and educated theologian and not look for the weirdiest individuals and places in the world.

And often try to look for arguments to approve their disbelieve (finding such arguments is a tought think and this is why a lot of people who try to look for arguments against Christ and Christianity – like me some 10 years ago often end up Christian). There is not one or two movies made on topic of "Scientific Atheism" in same spirit as Religulous, if one research on the facts presented in this movie he quickly understands a lot of the presented movie facts are either untrue or are true but have nothing to do with authentic Christianity which one can find in the most ancient of Churches Eastern and Oriental Orthodox Churches (like for example Syriac Orthodox and Copts).

Religulous and atheistic movies from its genre are not based on true facts either historical or scientific and even often doesn't follow strong rationalism  but more or less on particular person believe. They're looking to disprove God looking from answers in a very biased way.

I would close the post with a quote from the Holy Bible Psalms chapter, clearly addressing atheist people like Maher.
 

The fool hath said in his heart, there is no God.
Psalm 14:1

How to disable WordPress Visual Editor to solve problems Editor / Post problems after upgrade to WordPress 4.0

Monday, October 27th, 2014

wordpress-visual-editor-not-showing-problem-and-its-easy-fix-solution
Recently, I've upgraded to latest as of time of writting WordPress 4.0. The upgrade went fine however after upgrade even though I've upgraded also the CKEdit for WordPressVisual Editor stopped working. To solve the issue, my logical guess was to try to disable CKEditor:

(Plugins -> Ckeditor for WordPress (Deactivate)

However even after disabling, default WP Visual Editor continued to be not showing properly – e.g. the Publish / Save Draft / Preview buttons pane as well as the usual format text menu buttons (set text to Italic, Bold, Underline Text,  Create New Paragraph etc.) was completely missing and it was impossible to write anything in the text edit box like you see in below screenshot:

wordpress_visual_editor_missing_buttons_no-publish-button-wordpress_screenshot

I've red a lot on the internet about the issue and it seem a lot of people end up with the WordPress broken Visual Editor issue after upgrading to WP 3.9 and to WordPress 4.0. A lot of people did came to a fix, by simply disabling all WP plugins and enabling them one by one, however as I have about 50 WordPress plugins enabled in my WP blog disabling every plugins and re-enabling was too time consuming as I had to first write down all the plugins enabled and then re-enable them one by one by hand (after re-installing the wordpress version) testing after each whether the editor works or not ..
Therefore I skipped that fix and looked for another one. Other suggestions was to:

Edit wp-includes/css/editor.min.css and include at the end of file:
 

.mce-stack-layout{margin-top:20px}.wp-editor-container textarea.wp-editor-area{margin-top:67px;}


I've tried that one but for me this didn't work out ..

There were some people reporting certain plugins causing the visual editor issues such reported were:

  • NextScripts: Social Networks Auto-Poster
  • Google Sitemaps – Append UTW Tags
  • Google XML Sitemaps
  • TinyMCE Advanced (some suggested replacing TinyMCE and related scripts)
  • JS & CSS Script Optimizer … etc.
     

There were some suggestions also that the issues with Editor could be caused by the Used Blog Theme. It is true I'm using very Old WordPress theme, however as I like it so much I didn't wanted to change that one ..

Others suggested as a fix adding to site's wp-config.php:

define('CONCATENATE_SCRIPTS', false);

Unfortunately this doesn't work either.

Finally I've found the fix myself, the solution is as simple as disabling WordPress Visual Editor:

To disable WP Visual Editor:

1. Go to Upper screen right corner, after logged in to wp-admin (A drop down menu) with Edit My Profile will appear::

wordpress_edit_my_profile_screenshot
2. From Profile screen to appear select Disable the visual editor when writing scroll down to the bottom of page and click on Update Profile button to save new settings:

disable_the_visual_editor_when_writing

That's all now the Post / Edit of an Article will work again with text buttons only.

My cousin’s Marriage – Impressian from Burgas (Bulgaria) marriage and Kamenartzi herbal healer

Sunday, March 9th, 2008

kamenar-near-burgas-herbal-healing-bai-Dimitar-natural-healear-who-was-healing-cancer
We (Me and My Family) had to stand up early in the morning around 4:30 in Saturday and we traveled to Burgas. First we had to go to a herbman to prescribe me some Herbs. The herbamn is called “bai Dimitar” where bai is a bulgarian specific title for a man on age after the middle age he is located in Kamenartzi village (a small village near Bourgas). He is a sort of strange guy and is speaking very strange things. I hope this herbs will help me. I have to boil them and drink them five times a day. After that we went to Bourgas in my aunt Galia and uncle Galen’s apartment. Everything was a sort was going smooth, Gergana my cousin which was going to merry dressed with a bride dress and waited for his future man (son-in-law). The guy appeared with a limosine and an orchestra. Some ordinary Bulgarian rituals were followed after that the ceremony continued in the council house. Where they became man and wife officially (in front of Bulgaria). After that it followed a celebration in a Bourgas Hotel called “Bulgaria”. The celebration of the marriage included again different traditional Bulgarian dances, guest also danced and ofcourse the Bulgarian familiar horos. I did eat a lot of food and drinked a lot of the meaningless of marriage and all this vanity into celebrity and a lot of empty words spokened there I also convinced myself that I would NEVER EVER allow to have a marriage celebration like this. Some 20 or 30% of the music was Chalga which ofcourse drived me mad. In somewhere 05:00 in the morning we traveled back by car with my father driving. My father is driver from some few months and I definetely can’t say he is an experiencable type of driver which may allow himself to drive with speed higher than the maximum allowed, anywayz he did and I just tried to make him aware that he is braking the driver codex rules. He instead of taking my notes which I made with the idea that I would like to be home back ALIVE, nagged him and he started yelling at me and telling me to stop to complain. That ended in again making me hate him and regret I have parents like this which was a expected to happen since I was angry at all the stupidity and the low intelectual level of most of the ppl who were invited into the Marriage ceremony (although most of them were businessman and a ppl with a high degrees, education). The thing that irritated me the most that the had a marriage ceremony in a orthodox Church and they probably did this just because this is the ordinary way most ppl in Bulgaria does. PFF.. I have slept just for a hour or two today so I probably will go to sleep soon. But first I intend to go for a Liturgy in St. George’s orthodox church. This is after 20 minutes from now. Well thats most of how I spend my saturday on “nothing”. The good thing from all that was that Niki, a.k.a. Nomen’s brother has given me his PSP for the weekend. So I had the time to examine it and generally play with it. I even used a free wifi access in the restaurant where we were and did a bit of browsing :)END—–