kotori icon indicating copy to clipboard operation
kotori copied to clipboard

Fix "Connection pool is full"

Open adrianlzt opened this issue 5 years ago • 6 comments
trafficstars

A simple configuration option while creating the InfluxDB client should be enough. https://influxdb-python.readthedocs.io/en/latest/api-documentation.html#influxdbclient

pool_size (int) – urllib3 connection pool size, defaults to 10.

Added here

adrianlzt avatar Mar 21 '20 15:03 adrianlzt

Dear Adrián,

thanks for writing in and for using Kotori. May I ask you how you encountered this problem? While I know there might still be issues with the connection pooling, I am eager to get some repro or more detailed information about this, especially how it manifests for others.

With kind regards, Andreas.

amotl avatar Mar 21 '20 17:03 amotl

Just a pet project of an arduino sending data each 12.5ms

El sáb., 21 mar. 2020 a las 18:17, Andreas Motl ([email protected]) escribió:

Dear Adrián,

thanks for writing in and for using Kotori. May I ask you how you encountered this problem?

With kind regards, Andreas.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/daq-tools/kotori/issues/28#issuecomment-602074746, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAYWPGAFUAEIMBNESDV75Z3RITZDZANCNFSM4LQ6PW4Q .

adrianlzt avatar Mar 21 '20 19:03 adrianlzt

Thanks for the details. So, you are just sending a high throughput of datapoints to the MQTT bus which quickly triggers this condition and you are observing this through log messages on STDERR?

I will see what I can do against that. Do you believe that raising the pool size will solve the problem? Have you been able to solve it that way? And if so, which pool size did you use?

I am just thinking about what will happen if the pool is exhausted again. Shall we think about (additionally) introducing queues in order to buffer the writing?

amotl avatar Mar 21 '20 19:03 amotl

Yes, I increased the pool to 50 and it worked without warnings. I think just giving the option to users could be enough.

El sáb., 21 mar. 2020 a las 20:16, Andreas Motl ([email protected]) escribió:

Thanks for the details. So, you are just sending a high throughput of datapoints to the MQTT bus which quickly triggers this condition and you are observing this through log messages on STDERR?

I will see what I can do against that. Do you believe that raising the pool size will solve the problem? Have you been able to solve it that way? And if so, which pool size did you use?

I am just thinking about what will happen if the pool is exhausted again. Shall we think about introducing queues?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/daq-tools/kotori/issues/28#issuecomment-602089916, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAYWPGGLGCDQMRA46DNRRATRIUHA3ANCNFSM4LQ6PW4Q .

adrianlzt avatar Mar 21 '20 19:03 adrianlzt

All right, thanks! I will add pool_size as an option to the InfluxDB configuration then.

amotl avatar Mar 21 '20 19:03 amotl

Dear Adrián,

your suggestion has been implemented by b3cb7344 and will be part of the next release. Thanks again!

With kind regards, Andreas.

amotl avatar Apr 12 '20 22:04 amotl