Update 12/12/2010: Now i finally have the clues. It was plugins fault. Now i break to debug all the plugins query to the database.
From my previous post 504 Gateway Timeout With Nginx And Apache, i still having the same issue. But now i finally breakdown to what exactly cause it. Nginx will produce 504 gateway timeout error when the Apache response time reach the nginx proxy timeout. And what cause the Apache slow to response to the request, is the MySQL database slow query and high memory consumption.
I have optimize the Apache and MySQL server, the server was good for months. But lately i got the frequent nginx 504 gateway timeout error. Now i’m moving to debug slow mysql queries, and see what cause it.
In the server i have 6 WordPress blog with low traffic, maximum only serve 10k unique visitors per day. But as you know WordPress with bloated plugins, are very resource consuming. And i’m wondering which plugin that cause a whole server busy.