On Mon, 23 Mar 2015 09:16:14 +0100 Sigurd Mytting sigurd@mytting.no wrote:
On 2015-03-20 13:46, Morten Brekkevold wrote:
The fifth maintenance release of the NAV 4.2 series is now available.
I'm kind if thinking there is something fishy here as well, I'm running ipdevpolld with "-m" and are now seeing hundreds of postgres-processes looking like this in my "ps -ef" output:
postgres 13679 3183 4 08:56 ? 00:00:19 postgres: nav nav 192.168.217.121(55373) INSERT waiting
First of all, please remember that the "-m" mode is what we call "experimental". If you use it, each job configured in `ipdevpoll.conf` will have its own process, and each process will open 10 separate connections to PostgreSQL. If you have 10 jobs in `ipdevpoll.conf`, ipdevpoll will in total open 100 connections to PostgreSQL! This is nothing new in 4.2.5.
# ps -ef | grep -c INSERT\ waiting 263
Also from ipdevpoll.log for one of my routers (this is the default gateway for our nav-installation):
2015-03-23 06:15:12,773 [20245] [INFO schedule.netboxjobscheduler] [dns gw-1.somewhere] dns for gw-1.somewhere completed in 0:03:09.328468. next run in 0:56:50.671563.
Did this only occur after upgrading to 4.2.5? Does it go on like this "forever", or does it calm down a while after starting ipdevpoll?
I would connect to PostgreSQL and issue a "ALTER DATABASE nav SET log_min_duration_statement TO 1500;", then restart NAV.
PostgreSQL will now log any SQL statement in the NAV database that runs for more than 1500ms. Does PostgreSQL log many similar statements, and if so, which ones?
4.2.5 changed the way old job log entries are purged from the database, but it may still need some tuning to not cause inserts into the log table to take too long.