Postgres Apache issue

September 2, 2008 – 11:54

Got a strange issue after installing a new Moodle on our shared server:

I suspected this was due to some MaxClients (Apache) or max_connection (postgres) setting and after a bit of googling I found out that that was the case:

This is a common problem when there are more apache processes than postgresql is set to handle.

So I set the MaxClients in Apache to 200 and max_connections in postgres to 250. Still not working. However, after login, everything seems to be fine, at least for a while. Often with login and logout there’s immediately an idle process.

Damn, can’t seem to find the problem. Especially because another database is not having problems at all.

Well, gues what? The problem was in the Moodle codebase. After trying everything and anything, I found out that the problem only occurred when logging in as admin and going to e.g. notifications. So I downgraded to Moodle 1.9.2 (from 1.9.2+) and the problem dissapeared. Coolness.

After degrading performance by editing settings I finally boost up performance by increasing the work_mem setting to 10240 -> no, still when logging in an IDLE process is holding up the rest of the database

Sorry, comments for this entry are closed at this time.