Make sure that you have added ?pgbouncer=true&connection_limit=1 to the DATABASE_URL. I was experiencing the same error and that was the origin of the problem.
?pgbouncer=true&connection_limit=1