-
-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
exception - queue full in nlsocket - async_recv() #1034
Comments
Looks like the parser doesn't manage to handle the packet flow. Possible solutions: 1. increase the buffer queuefrom pyroute2 import config, IPRoute
config.async_qsize = X
ipr = IPRoute()
# or
from pyroute2 import IPRoute
ipr = IPRoute(async_qsize=X) Where X is the queue max size, by default 4096. The socket uses 64K buffers for each 2. use a custom parser
More on parsers and how to run own implementations: https://docs.pyroute2.org/parser.html |
As I understand this could happen due to temporal event storm, in which case the parser will lose pace against the socket reader, and the queue will get full. |
@LuiGuest there are three ways setting up that:
...
|
Thank You a lot for your help! |
example code:
with IPRoute() as ipr:
# With IPRoute objects you have to call bind() manually
ipr.bind(async_cache=True)
while True:
try:
for message in ipr.get():
<....>
except OSError as e:
raise e
callstack:
for message in ipr.get():
File "/usr/local/lib/python3.9/site-packages/pr2modules/netlink/nlsocket.py", line 394, in get
return tuple(self._genlm_get(*argv, **kwarg))
File "/usr/local/lib/python3.9/site-packages/pr2modules/netlink/nlsocket.py", line 788, in get
data = self.recv_ft(bufsize)
File "/usr/local/lib/python3.9/site-packages/pr2modules/netlink/nlsocket.py", line 1067, in recv_plugin
raise data_in
File "/usr/local/lib/python3.9/site-packages/pr2modules/netlink/nlsocket.py", line 580, in async_recv
self.buffer_queue.put_nowait(data)
File "/usr/lib64/python3.9/queue.py", line 191, in put_nowait
return self.put(item, block=False)
File "/usr/lib64/python3.9/queue.py", line 137, in put
raise Full
The text was updated successfully, but these errors were encountered: