fedora-infra/datanommer

On bigger loads there is problem with queries on postgres table

Opened this issue · 0 comments

The error in the response was

    This probably means the server terminated abnormally
    before or while processing the request.
 'SELECT count(*) AS count_1 
  FROM (SELECT 
                  messages.id AS messages_id, 
                  messages.msg_id AS messages_msg_id, 
                  messages.i AS messages_i, 
                  messages.topic AS messages_topic, 
                  messages.timestamp AS messages_timestamp,
                  messages.certificate AS messages_certificate,
                  messages.signature AS messages_signature, 
                  messages.category AS messages_category, 
                  messages.username AS messages_username, 
                  messages.crypto AS messages_crypto, 
                  messages.source_name AS messages_source_name,
                  messages.source_version AS messages_source_version,
                  messages._msg AS messages__msg, 
                  messages._headers AS messages__headers
               FROM messages
               WHERE messages.timestamp BETWEEN %(timestamp_1)s AND %(timestamp_2)s 
                     AND messages.topic = %(topic_1)s) AS anon_1' {'timestamp_2': datetime.datetime(2021, 1, 22, 11, 13, 3), 'topic_1': u'org.fedoraproject.prod.bodhi.update.status.testing.koji-build-group.build.complete', 'timestamp_1': datetime.datetime(2021, 1, 22, 10, 56, 2)}

and

 Can't reconnect until invalid transaction is rolled back (original cause: InvalidRequestError: Can't reconnect until invalid transaction is rolled back) u'
SELECT count(*) AS count_1 
FROM (SELECT messages.id AS messages_id, messages.msg_id AS messages_msg_id, messages.i AS messages_i, messages.topic AS messages_topic, messages.timestamp AS messages_timestamp, messages.certificate AS messages_certificate, messages.signature AS messages_signature, messages.category AS messages_category, messages.username AS messages_username, messages.crypto AS messages_crypto, messages.source_name AS messages_source_name, messages.source_version AS messages_source_version, messages._msg AS messages__msg, messages._headers AS messages__headers 
FROM messages \nWHERE messages.timestamp BETWEEN %(timestamp_1)s AND %(timestamp_2)s AND messages.topic = %(topic_1)s) AS anon_1' [immutabledict({})]