Category: Web

Solve php-fpm consume high CPU usage 100% 200%

Solve php-fpm consume high CPU usage 100% 200%

Suddenly my server crashed and I see that php5-fpm usage was the culprit and it’s consume 100% of CPU usage. Fyi, I use NGINX and WordPress on this case. I tried several thing to solve php-fpm issue like change listener into socket instead of ports. Also, I use APC as well, but it’s doesn’t works. …

+ Read More

Javascript URL window location works on Chrome but fail on Firefox

Javascript URL window location works on Chrome but fail on Firefox

This is commmon things that happen when we’re using “window.location.origin” to define the path for AJAX call or another purpose. Actually, “window.location.origin” isn’t in browser standard. Firefox try the best to obey the standard which “window.location.origin” is not supported hence it give “undefined” result. Substitution for this, you can use: 1window.location.protocol + "//" + window.location.host