Title: Some sockets are opened but never read. UDP socket buffer memory usage increases · Issue #171 · python-zeroconf/python-zeroconf · GitHub
Open Graph Title: Some sockets are opened but never read. UDP socket buffer memory usage increases · Issue #171 · python-zeroconf/python-zeroconf
X Title: Some sockets are opened but never read. UDP socket buffer memory usage increases · Issue #171 · python-zeroconf/python-zeroconf
Description: In the Zeroconf class init, some sockets: https://github.com/jstasiak/python-zeroconf/blob/c7876108150cd251786db4ab52dadd1b2283d262/zeroconf.py#L1810 are created in both the unicast and multicast case. But here: https://github.com/jstasi...
Open Graph Description: In the Zeroconf class init, some sockets: https://github.com/jstasiak/python-zeroconf/blob/c7876108150cd251786db4ab52dadd1b2283d262/zeroconf.py#L1810 are created in both the unicast and multicast c...
X Description: In the Zeroconf class init, some sockets: https://github.com/jstasiak/python-zeroconf/blob/c7876108150cd251786db4ab52dadd1b2283d262/zeroconf.py#L1810 are created in both the unicast and multicast c...
Opengraph URL: https://github.com/python-zeroconf/python-zeroconf/issues/171
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Some sockets are opened but never read. UDP socket buffer memory usage increases","articleBody":"In the Zeroconf class init, some sockets:\r\nhttps://github.com/jstasiak/python-zeroconf/blob/c7876108150cd251786db4ab52dadd1b2283d262/zeroconf.py#L1810\r\n\r\nare created in both the unicast and multicast case.\r\n\r\nBut here:\r\nhttps://github.com/jstasiak/python-zeroconf/blob/c7876108150cd251786db4ab52dadd1b2283d262/zeroconf.py#L1858-L1862\r\nin case of multicast, the `_respond_sockets` are never read.\r\n\r\nThis causes some problem with the Recv queue of UDP, because the OS (in my case Ubuntu) keeps all the packets in memory waiting for the socket to read them, but this never happens and the memory keeps growing \"forever\"!\r\n\r\nThis is my output of `sudo ss -nlpu`:\r\n```\r\nState Recv-Q Send-Q Local Address:Port Peer Address:Port \r\nUNCONN 156416 0 0.0.0.0:5353 0.0.0.0:* users:((\"python\",pid=10571,fd=54)) \r\n```\r\n \r\n\r\n**To solve:**\r\nI tried running these two lines\r\nhttps://github.com/jstasiak/python-zeroconf/blob/c7876108150cd251786db4ab52dadd1b2283d262/zeroconf.py#L1861-L1862\r\neven in the case of multicast. \r\nThe problem is \"solved\".\r\n\r\nI'm sure that is not the right solution and may actually be logically wrong doing that for this case.\r\nI'm not an expert, but maybe there is a way to actually tell the OS that those sockets are not interested in listening for packets.\r\n\r\n\r\n \r\n","author":{"url":"https://github.com/nicoladefranceschi","@type":"Person","name":"nicoladefranceschi"},"datePublished":"2019-05-24T15:07:43.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":24},"url":"https://github.com/171/python-zeroconf/issues/171"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4967d4f4-593f-bd1f-a96f-492a9f1bafdd |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C492:11F96E:3770DCF:4BFBD0B:6972CF84 |
| html-safe-nonce | 6f7d6bb447d606340a3ad60f6b7e837f4b6e498dcf421ec9ff72fa798fa6c0a7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNDkyOjExRjk2RTozNzcwRENGOjRCRkJEMEI6Njk3MkNGODQiLCJ2aXNpdG9yX2lkIjoiMjc2ODQ4MTQ3MzQ3MDMyMDUxNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 59834699a59d1853e6c820fc6cde59b1a1a73fe67bc456f3aa1d39af6c57feaa |
| hovercard-subject-tag | issue:448220106 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-zeroconf/python-zeroconf/171/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2a941ecdec141b49e8d03ff782c8b4b5d457176ffff73ebe72f20e1416ac235e/python-zeroconf/python-zeroconf/issues/171 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2a941ecdec141b49e8d03ff782c8b4b5d457176ffff73ebe72f20e1416ac235e/python-zeroconf/python-zeroconf/issues/171 |
| og:image:alt | In the Zeroconf class init, some sockets: https://github.com/jstasiak/python-zeroconf/blob/c7876108150cd251786db4ab52dadd1b2283d262/zeroconf.py#L1810 are created in both the unicast and multicast c... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | nicoladefranceschi |
| hostname | github.com |
| expected-hostname | github.com |
| None | e5abb0753dbd4190d15d366a819b0ca85f68a7e5bbe3d32213b346c41685c80a |
| turbo-cache-control | no-preview |
| go-import | github.com/python-zeroconf/python-zeroconf git https://github.com/python-zeroconf/python-zeroconf.git |
| octolytics-dimension-user_id | 120192235 |
| octolytics-dimension-user_login | python-zeroconf |
| octolytics-dimension-repository_id | 21548731 |
| octolytics-dimension-repository_nwo | python-zeroconf/python-zeroconf |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 21548731 |
| octolytics-dimension-repository_network_root_nwo | python-zeroconf/python-zeroconf |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 88896109b054799a7f22afaeee541d00f9170dc3 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width