mirror of
https://github.com/proxmoxer/proxmoxer.git
synced 2026-04-25 07:06:00 +03:00
[GH-ISSUE #101] Synchronous requests connection pool warnings (Home Assistant) #52
Labels
No labels
backend:https
backend:local
backend:openssh
backend:ssh_paramiko
pull-request
status:ansible-issue
status:help-wanted
status:info-needed
status:proxmox-issue
status:review-needed
type:bug 🐞
type:dependency ⛓️
type:docs 📝
type:enhancement ⏫
type:maintenance 🛠️
type:meta
type:question ❓
type:request ✋
type:testing 🧪
version:1.x
version:latest
version:py2
version:py3
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/proxmoxer#52
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Corbeno on GitHub (Jun 13, 2022).
Original GitHub issue: https://github.com/proxmoxer/proxmoxer/issues/101
Originally assigned to: @jhollowe on GitHub.
If more then 10 vms/containers are polled concurrently, a warning occurs. This doesn't normally happen, but the current way the Home Assistant integration works is by queueing up multiple requests all at the same time.
Here is an example of the logs if a single node has 11+ vms/containers added to it in Home Assistant.
This has been reported here: https://github.com/home-assistant/core/issues/68487
According to this stack overflow post, no data is actually being lost though, so I think the warning can be disabled without any worry.
Another solution would be to increase the pool size, but this issue will just come up again when somebody with even more vms/containers breaks the limit again.
I'm not sure how to go about either solutions for this project though. Is this something that can be fixed in this library?
@jhollowe commented on GitHub (Jun 16, 2022):
The connection pool is something provided by urllib3 that reuses the TCP (and TLS) connection for subsequent requests. Like you said, this error appears only after a request and response has been made successfully (at least successful at the TCP level). It just prevents you from having to go to all the work of tearing down the connection just to create it again moments later.
I would suggest just disabling the error message (I assume it is using the
logginglibrary which makes this easy). You could also limit the number of workers to the size of the connection pool so that there are only 10 connection requests at a time and thus connections are never dropped and the polling is the most efficient use of the connections.This is something outside the scope of proxmoxer so I'm going to close this issue. Feel free to still ask any questions you still have.