Closed andrewcottam closed 4 years ago
This is difficult to reproduce but changing the maxsize from 0 to 100 stopped the error initially. The line:
with (await self.pool.cursor()) as cur:
Is the line that caused the error in #213
aiopg is quirky and the docs don't really explain some of the weird behavior. All of the aiopg raised Exceptions (unclosed connection, GeneratorExit etc) are due to the minsize and maxsize parameters of the pool. You must set minsize to 10 to avoid these errors - not sure why.
This happens when running the stress test 19 with 30 users on marxantraining.org with 8 CPU. It doesn't happen on andrewcottam.com which has 1 CPU.
Full trace:
This is a bug in aiopg: if you set maxsize=0 then in this test (self.size < self.maxsize) maxsize is None.