We’ve been experiencing some issues with our database server during peak hours. In our Nginx error-log we can see that a lot of requests get timed out. The requests are also very slow. We have had this issue for a couple of weeks. At first we got problems like
FATAL: remaining connection slots are reserved for non-replication superuser connections
But after optimising the code by using memcached to let of some of the load from postgres as well as making som smarter queries, we got rid of this problem. The postgresql log of slow queries looks a lot nicer now, but we are still experiencing a lot of timed out requests during peak hours. So the question is: Where is the bottleneck?
We’ve installed munin to log a lot of parameters to check the health status but acctually, we don’t get any closure out of this.
- Is there anything that look strange in the graphs?
- What should we focus on gettings more efficient?
- Is there any indications on what may cause the issues during peak hours? (19:00 – 23:00)
Look at the benchmark here: http://bit.ly/WwJPKA
Some info about our current setup:
- 8 CORES
- 16GB RAM
- 100 GB, RAID-10 * SAS 15.000 RPM
- PostgreSQL 9.1.5
For more info about our PostgreSQL.conf checkout this