Opened 8 years ago

Closed 8 years ago

#1865 closed task (fixed)

Disable Trac repository sync on pageview

Reported by: strk Owned by: strk
Priority: normal Milestone:
Component: SysAdmin/Trac Keywords: performance
Cc:

Description

It looks like code repositories of all trac instances are being synchronized upon page view. It would be less hammering to only sync via commit hooks as I think all projects already do.

The /var/log/trac/trac_all.log file is full of lines like these:

[2017-02-01 02:45:35,610] osgeo:api INFO: Synchronized '(default)' repository in 0.00 seconds
[2017-02-01 02:45:35,894] osgeo:api INFO: Synchronized '(default)' repository in 0.00 seconds

So you get the idea...

As part of the trac update (#1816) I've seen project-local trac.ini files getting a new sync_per_request=true directive, which might be due to a new default of false we might want to go after.

Ideally, we'd put the sync=false in the global trac config

Change History (4)

comment:1 by strk, 8 years ago

Note there's a system-wide script to use for synchronizing with trac: /var/www/svn/hookscripts/osgeo-post-commit-hook, see #1556 for example

comment:2 by strk, 8 years ago

I've disabled sync-per-page on these repositories, after verifying each for having hook-based sync scripts in place:

  • postgis
  • osgeo
  • grass
  • gdal
  • mapserver
  • mapguide
  • geos
  • ossim
  • fdo
  • fusion
  • geotiff
  • csmap
  • proj4js
  • mapbender
  • openlayers
  • qgis

More are left to check:

featureserver/conf/trac.ini:.sync_per_request = true
geoinformatica/conf/trac.ini:.sync_per_request = true
geomoose/conf/trac.ini:.sync_per_request = true
geoprisma/conf/trac.ini:.sync_per_request = true
gittest/conf/trac.ini:.sync_per_request = true
metacrs/conf/trac.ini:.sync_per_request = true
moss4g/conf/trac.ini:.sync_per_request = true
osgeo4w/conf/trac.ini:.sync_per_request = true
proj4j/conf/trac.ini:.sync_per_request = true
ubuntugis/conf/trac.ini:.sync_per_request = true

comment:3 by strk, 8 years ago

All remaining ones were done:

  • ubuntugis
  • proj4j
  • osgeo4w
  • moss4g
  • metacrs
  • gittest (does not have hooks for the git repo, but we can drop the instance)
  • geoprisma
  • geomoose
  • geoinformatica
  • featureserver

At this point I think we could make it a global option, no instance should ever need a sync_per_request (the gittest can be removed I think).

comment:4 by strk, 8 years ago

Resolution: fixed
Status: newclosed

So the default for sync_per_request is false so omitting it would do what we want already. Explicitly setting a global value would also work but the setting needs be prefixed with the name of the repository so for instances with multiple repositories it would be impractical to encode the name in the global configuration anyway (no globing supported).

So for now we keep the explicit value set to false, new repositories should have it false already due to the default. Closing this out as finished.

Note: See TracTickets for help on using tickets.