Redis if Large insert and Background Save to Disk Failed

Large insert into Redis Server cause many RDB: Background Save to Disk You maybe get Error in your redis log like: SOLUTION Edit File: /etc/sysctl.confPut this at the end of line (Put in the bottom of file): Restart Sysctl to Get new CONFIG Optional, restart your redis server SOURCE https://stackoverflow.com/questions/11752544/redis-bgsave-failed-because-fork-cannot-allocate-memory

Read More Redis if Large insert and Background Save to Disk Failed

Resize images with find and ImageMagick

$ find pictures/ -type f -iname ‘*.jpg’ | xargs -I ‘{}’ convert ‘{}’ -resize 150×150 -quality 100 ‘{}’.png  Command break down find is a command that searches for files and directories, optionally matching certain criteria. pictures/ tells find where to start its search. -type f is the first search criterion: it tells find to only […]

Read More Resize images with find and ImageMagick

apache php-fpm performance tuning

My environment AWS EC2 (m4.xlarge): 4 *2,4GHz | 16GB RAM Ubuntu 16.04 Apache 2.4 using mpm_event cd ~ wget https://raw.githubusercontent.com/pixelb/ps_mem/master/ps_mem.py chmod a+x ps_mem.py sudo python ps_mem.py <IfModule mpm_*_module> ServerLimit (Total RAM – Memory used for Linux, DB, etc.) / process size StartServers (Number of Cores) MinSpareThreads 25 MaxSpareThreads 75 ThreadLimit 64 ThreadsPerChild 25 MaxRequestWorkers (Total […]

Read More apache php-fpm performance tuning