Configure php-fpm and nginx to run in low memory server

It was pain in the ass to have php-fpm and nginx together to serve php app, especially when you’re running on low-memory server, especially when you’re running cms like wordpress which basically heavy duty. I had a Centos server running with memory only 1024Mb (1Gb).

My web kept crushed every single time. And the problem stil remains, memory leak.

I don’t know what the root cause was. I still don’t know what that is but I think it’s something to do with php-fpm configuration or even nginx.

Just several days ago I had my blog up and running with wordpress in the same type of server, same OS (Centos) with the same memory (1Gb) and since I didn’t want to use apache for some reason, guess I had to get my nginx and php-fpm working together again.

I thought my web would be running very smoothly since the blog was still unlikely to receive much traffic. But I was wrong, somehow the memory was leaked again. My server only running with 1024Mb, but I thought It didn’t matter. The only way to get this problem mitigated is to tune up both the php-fpm and nginx configurations which I never liked this. But I need this, so let’s get this done.

Read more

Setup nginx, php, wordpress in ubuntu

So after all these years I’ve had using apache for run something that runs with php, but since I know about nginx, I’ve been using this webserver instead of apache. This wordpress blog is running with nginx and php-fpm, because not like apache that you can run anything about php without install the additional package. With … Read more