Increase track_activity_query_size on rendering databases
Closed, ResolvedPublic

Description

The PostgreSQL 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

StatusAssignedTask
OpenNone
OpenPnorman
OpenPnorman
OpenNone
OpenNone
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
OpenPnorman
ResolvedPnorman
OpenPnorman
ResolvedPnorman
OpenPnorman
OpenNone
Pnorman created this task.Mar 10 2017, 10:38 PM

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 closed this task as Resolved.Mar 27 2017, 7:12 PM
Pnorman claimed this task.