title: Asyncpg/PostgreSQL (python/discord.py)
body: <p>I'm having an issue where my discord bot stops replying to commands that use the database (postgresql and asyncpg) after a load of traffic.</p>
  
  <p>I've checked the db and it doesn't go offline or anything and I don't get any errors what so ever.</p>
  
  <p><code>help</code> works fine as it doesn't use the db</p>
  
  <p>How I create/use the connection : </p>
  
  <pre class="lang-py prettyprint-override"><code>#How I create the connection
  
  async def create_connection_pool():
      bot.pg_conn = await asyncpg.create_pool(**credentials)
  @bot.event
  async def on_ready():
      await create_connection_pool()
  
  #How I use it
  
  @voice.command()
      async def name(self, ctx,*, name):
          con = await self.bot.pg_conn.acquire()
          id = ctx.author.id
          voice = await self.bot.pg_conn.fetchrow("SELECT * FROM voice_channels WHERE user_id = $1", id)
          if voice is None:
              await ctx.channel.send(f"{ctx.author.mention} You don't own a channel.")
          else:
              channel = self.bot.get_channel(voice['voice_channel_id'])
              await channel.edit(name = name)
              await ctx.channel.send(f'{ctx.author.mention} You have changed the channel name to '+ '{}!'.format(name))
              voice = await self.bot.pg_conn.fetchrow("SELECT * FROM user_settings WHERE user_id = $1", id)
              if voice is None:
                  async with con.transaction():
                      await con.execute("INSERT INTO user_settings VALUES ($1, $2, $3)", (id,name,0))
              else:
                  async with con.transaction():
                      await con.execute("UPDATE user_settings SET channel_name = $1 WHERE user_id = $2", name, id)
          await self.bot.pg_conn.release(con)
  </code></pre>
  
  <p>Any thoughts on what I could be doing wrong ?</p>
  
  <p>I've tried using try/except didn't get anything</p>
  
  <p>Added a bunch of debug prints in there, doesn't get past </p>
  
  <p><code>15 | voice = await self.bot.pg\_conn.fetchrow("SELECT \* FROM voice\_channels WHERE user\_id = $1", id)</code> </p>
  
  <p>and tried adding a timeout to the fetch and that didn't do anything.
  although when I do keyboardinterupt it comes out of of the fetch just before shutting down and runs the print.</p>
  
  <p>If someone could help me I'd really appreciate it.</p>