<div dir="ltr"><br><div>+1 this looks good.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 6 April 2015 at 10:33, Tim Flink <span dir="ltr">&lt;<a href="mailto:tflink@redhat.com" target="_blank">tflink@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">We&#39;re continuing to have timeout issues in Taskotron staging and my<br>
investigation so far seems to indicate the cause to be slow queries in<br>
the database.<br>
<br>
This change does require a database restart but due to the way that<br>
Taskotron works, I can do this so that there are no lost jobs and no<br>
significant downtime. I&#39;d stop incoming jobs until all queues are empty<br>
and record the jobs which would have been scheduled on a machine<br>
outside of infra. Once those queues are empty, I&#39;d shut down all the<br>
db-using processes, apply the patch, restart the db, start everything<br>
back up and enqueue the jobs which would have been scheduled.<br>
<br>
This template change to the postgresql-server module will only affect<br>
<a href="http://db-qa01.qa" target="_blank">db-qa01.qa</a> but will make it look like other postgres servers have a<br>
pending change due to the way I&#39;ve changed the postgresql.conf template.<br>
<br>
I&#39;m not crazy about doing this during freeze but I&#39;m worried that the<br>
timeout problem will start affecting more than stg before long and<br>
want to get this figured out before that happens.<br>
<br>
+1s?<br>
<br>
Tim<br>
<br>
<br>
diff --git a/roles/postgresql_server/templates/postgresql.conf b/roles/postgresql_server/templates/postgresql.conf<br>
index 603f9ea..c9756b8 100644<br>
--- a/roles/postgresql_server/templates/postgresql.conf<br>
+++ b/roles/postgresql_server/templates/postgresql.conf<br>
@@ -319,9 +319,15 @@ log_rotation_size = 0                   # Automatic rotation of logfiles will<br>
                                         #   fatal<br>
                                         #   panic (effectively off)<br>
<br>
+{% if ansible_hostname.startswith(&quot;db-qa01&quot;) %}<br>
+log_min_duration_statement = 500        # -1 is disabled, 0 logs all statements<br>
+                                        # and their durations, &gt; 0 logs only<br>
+                                        # statements running at least this time.<br>
+{% else %}<br>
 #log_min_duration_statement = -1        # -1 is disabled, 0 logs all statements<br>
                                         # and their durations, &gt; 0 logs only<br>
                                         # statements running at least this time.<br>
+{% endif %}<br>
<br>
 #silent_mode = off                      # DO NOT USE without syslog or<br>
                                         # logging_collector<br>
<br>_______________________________________________<br>
infrastructure mailing list<br>
<a href="mailto:infrastructure@lists.fedoraproject.org">infrastructure@lists.fedoraproject.org</a><br>
<a href="https://admin.fedoraproject.org/mailman/listinfo/infrastructure" target="_blank">https://admin.fedoraproject.org/mailman/listinfo/infrastructure</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Stephen J Smoogen.<br><br></div></div>
</div>