Calculate Maximum MySQL Memory Usage

Published on Author gryzli

Recently I found the following script pretty handy for calculating the maximum amount of memory mysql could use, based on the current buffers configuration.   This is the source: #!/bin/sh# you might want to add some user authentication here mysql -e “show variables; show status” | awk ‘ { VAR[$1]=$2 } END { MAX_CONN =… Continue reading Calculate Maximum MySQL Memory Usage

Regex (PCRE) matching row with excluded words

Published on Author gryzli

Recently I had a task to match a given row, only if it contains words, different than a predefined non-matching word list.    Here is the example: Let say we have the excluded words: “bad_word1|bad_word2” We must match a row only if there words, different than the bad words from above   That should match:… Continue reading Regex (PCRE) matching row with excluded words

Centos 5 Yum Is Throwing [Errno -3] Error performing checksum

Published on Author gryzli

If you happen to encounter this problem, you could try the following fixes:   1| If you are using “custom” repository If you are using custom repository, which is made by newer version of “createrepo” , there is a big chance that you repodata checksums are generated with sha256. Centos 5’s yum doesn’t support sha256… Continue reading Centos 5 Yum Is Throwing [Errno -3] Error performing checksum

Systemd – systemctl list-unit-files timeouts

Published on Author gryzli

The problem Recently I’ve started to occasionally see systemctl to timeout, while executing “list-unit-files”. The problem itself looks very annoying and the first thought I had was: “systemd is bugged out, the server must be restarted” In my current case, the problem is observed on a Centos 7 box. If you “restart” the server you… Continue reading Systemd – systemctl list-unit-files timeouts

Centos 6 – Curl , SSL and Illegal Instruction error

Published on Author gryzli

The “Illeagal Instruction” problem If you recently started to see errors like “illegal instruction” while trying to execute different web accessing scripts/binaries (like curl httpS://example.com), then most probably your Centos 6  NSS package was just updated.   The impact of this bug is enormous, because every single HTTP library which uses nss,openssl for maintaining HTTPS… Continue reading Centos 6 – Curl , SSL and Illegal Instruction error

(Fedora) Lenovo Thinkpad T440 T450 T460 – Fix Trackpoint Scrolling And Left Button

Published on Author gryzli

The Problem I was using Fedora 23 happily with my old Thinkpad T520 and all of my trackpoint “stuff” was working just fine. After buying a new T460, suddenly I faced some trackpoint-related problems: First: The middle trackpoint button stopped scrolling anything Second: The left trackpoint button stopped working for marking text (only double-clicks were… Continue reading (Fedora) Lenovo Thinkpad T440 T450 T460 – Fix Trackpoint Scrolling And Left Button

Centos 7 – Missing php/Apache temporary files in /tmp – Systemd Private Temp

Published on Author gryzli

If you are using Centos 7 and have installed Apache or PHP-FPM through yum, then you most probably will face the following problem: Files created in /tmp directory by Apache CGI’s or PHP, seems to be missing The reason for this is another “great” Systemd feature, called “Private Temp“. This security orientated feature is used… Continue reading Centos 7 – Missing php/Apache temporary files in /tmp – Systemd Private Temp

Ansible – Failing playbook with Error: AttributeError: ‘str’ object has no attribute ‘format’

Published on Author gryzli

The problem My playbook task was looking like this: – name: Execute simple command command: /some/simple/commmand The error persisted even after changing “command:” to “shell:”   If you happen to hit ansible error like this: failed: [some_host] => {“failed”: true, “parsed”: false} Traceback (most recent call last): File “/root/.ansible/tmp/ansible-tmp-1425474902.88-6397676824195/command”, line 129, in ? PARAM_REGEX =… Continue reading Ansible – Failing playbook with Error: AttributeError: ‘str’ object has no attribute ‘format’

Ansible – Failing playbook with Error: ansible requires a json module, none found!

Published on Author gryzli

If your ansible-playbook happens to fail with the following error message: Error: ansible requires a json module, none found! Most probably your solution will be to: install “python-simplejson” on the remote host (where ansible-playbook tries to connect) In my case the remote host is running Centos 5.x, but if you are using a different distro,… Continue reading Ansible – Failing playbook with Error: ansible requires a json module, none found!

Nginx + php-fpm – Getting Internal server error 504

Published on Author gryzli

Nginx + php-fpm (and not only) could produce Internal Server Error 504. If you happen to get this error, usually after waiting about 60 seconds(this is the default timeout for lots of timeout directives) for some php operation, then you can try to rise the following limits: 1. Rising php.ini limits Make sure to increase… Continue reading Nginx + php-fpm – Getting Internal server error 504