Commit 16415873 authored by Cristiano Urban's avatar Cristiano Urban
Browse files

Reduced max num of database connections to 16 for now.

parent 3f7a76d9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ class AMQPServer(threading.Thread):
        self.connection = pika.BlockingConnection(pika.ConnectionParameters(host = self.host, port = self.port))
        self.channel = self.connection.channel();
        self.channel.queue_declare(queue = self.queue)
        self.channel.basic_qos(prefetch_count = 32)
        self.channel.basic_qos(prefetch_count = 16)
        threading.Thread(target = self.channel.basic_consume(queue = self.queue, on_message_callback = self.on_request))

    def on_request(self, ch, method, props, body):
+1 −1
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ class DbConnector(object):
    def createConnectionPool(self):
        self.connPool = ThreadedConnectionPool(
            8,
            32,
            16,
            user = self.user,
            password = self.password,
            host = self.host,