Page MenuHomePhabricator

Increase track_activity_query_size on rendering databases
Closed, ResolvedPublic

Description

The PostgreSQL GUC [track_activity_query_size](https://www.postgresql.org/docs/current/static/runtime-config-statistics.html#GUC-TRACK-ACTIVITY-QUERY-SIZE) specifies the number of bytes reserved to track the currently executing command for each active session for pg_stat_activity, with a default of 1024.

Queries in most Mapnik stylesheets exceed this, including Meddo. Vector tile queries tend to involve lots of UNION ALL statements.

I recommend increasing it to 16384, so if we have a slow query or stuck query we can see what it is to EXPLAIN it or debug it locally. The longest current query is 4936 bytes before Mapnik inserts additional text.

This would cost 15kb more memory per connection slot, an insignificant amount.

See also https://github.com/openstreetmap/chef/issues/92

Related Objects

StatusSubtypeAssignedTask
OpenNone
InvalidNone
OpenFeatureNone
InvalidNone
OpenNone
ResolvedPnorman
DeclinedNone
DeclinedNone
ResolvedPnorman
ResolvedPnorman
ResolvedPnorman
ResolvedPnorman
ResolvedPnorman
ResolvedPnorman
ResolvedPnorman
ResolvedPnorman
ResolvedPnorman
ResolvedPnorman
ResolvedPnorman
ResolvedPnorman
ResolvedPnorman
ResolvedPnorman
DuplicateNone
ResolvedPnorman
ResolvedNone
ResolvedPnorman
ResolvedPnorman
ResolvedPnorman
ResolvedPnorman
ResolvedPnorman
ResolvedPnorman
Resolveddebt
ResolvedPnorman
ResolvedPnorman
ResolvedNone
ResolvedPnorman
ResolvedPnorman
ResolvedPnorman
ResolvedPnorman
ResolvedPnorman
ResolvedPnorman
ResolvedPnorman
ResolvedPnorman
DeclinedPnorman
ResolvedPnorman
DeclinedPnorman
ResolvedPnorman
ResolvedPnorman
ResolvedPnorman

Event Timeline

Change 342870 had a related patch set uploaded (by Gehel):
[operations/puppet] maps - increase postgresql track_activity_query_size to 16384

https://gerrit.wikimedia.org/r/342870

Change 342870 merged by Gehel:
[operations/puppet] maps - increase postgresql track_activity_query_size to 16384

https://gerrit.wikimedia.org/r/342870

Mentioned in SAL (#wikimedia-operations) [2017-03-15T20:44:49Z] <gehel> restarting postgresql on maps clusters - T160209

Gehel moved this task from Backlog to Done on the Maps-Sprint board.
Pnorman claimed this task.