[PYTHON] OSError: [Errno 40] What to do when Message too long appears

During UDP communication

OSError: [Errno 40] Message too long

I was in trouble because of the error, so I will post it so that I do not forget the remedy.

Coping

sysctl -a | grep udp.maxdgram

When you execute, the packet capacity for udp communication is displayed.

net.inet.udp.maxdgram: 9216

I solved it by changing this value.

sudo sysctl -w net.inet.udp.maxdgram=65536

Where it didn't work

Actually, at this time, even if I sent the data of size 65536 with Python, an error still occurred, so I made the data a little smaller and sent it. Is it sent with some extra information added ... I would be grateful if anyone could tell me something.

Recommended Posts

OSError: [Errno 40] What to do when Message too long appears
[Go 1.13] What to do when unexpected directory layout: appears
[openpyxl] What to do when IllegalCharacterError appears in pandas.DataFrame.to_excel
What to do when [Errno 2] No such file or directory appears in Python
What to do when "Invalid HTTP_HOST header" appears in Django
What to do if Insecure Platform Warning appears when running Python
[Memorandum] What to do when a warning appears after executing pip list
What to do when pyinstaller: error: argument --add-binary: invalid add_data_or_binary value: appears
[Docker] What to do when error Couldn't find the binary git appears
What to do when the warning "The environment is in consistent ..." appears in the Anaconda environment
What to do when a warning message is displayed in pip list
What to do when PermissionError of tempfile.mkstemp occurs
What to do when "TypeError: must be string, not int…" appears when using strptime
What to do when a warning appears around Python integration in Neovim's CheckHealth
What to do if NotADirectoryError: [Errno 20] Not a directory:'xdg-settings' appears in jupyter notebook
[Memorandum] What to do when a warning appears after executing pip list
What to do when a warning message is displayed in pip list
curl: (60) What to do when Issuer certificate is invalid.
What to do when gdal_merge creates a huge file
What to do when raise ValueError, "unsupported hash type"
What to do when "cannot import name xxx" [Python]
What to do when you can't bind CaboCha to Python
[Python] What to do when No module named'pyproj.datadir' appears when Exe is done with PyInstaller
What to do when "Type Error: must be _socket.socket, not socket" appears on GAE
What to do when Japanese is not displayed on matplotlib
What to do when a Remove Error occurs when updating conda
What to do when Unalignable boolean Series provided as indexer
What to do when an error occurs with import _ssl
What to do if package installation fails when deploying to heroku
ImportError: No module What to do when you are told
[Beginner] What to do when "[Errno 2] File b'test.csv' does not exist: b'test.csv" is displayed when reading pandas csv
[virtualbox] What to do when [Could not retrieve mirrorlist] appears when yum update is performed on CentOS7
[AWS] What to do when the ping command causes a "timeout"
What to do when a video cannot be read by cv2.VideoCapture
[Beanstalk] What to do when an error occurs with import uuid
What to do when you get "I can't see the site !!!!"
What to do when UnicodeDecodeError occurs during read_csv in pandas (pd.read_table ())
What to do when ModuleNotFoundError: No module named'XXX' occurs in Python
What to do when the value type is ambiguous in Python?
What to do if grep: empty (sub) expression appears on Mac grep
What to do if yum breaks
What to do with Magics install
What to do with PYTHON release?
What to do to get tensorflow-gpu to work
What to do when "OS Error: [WinError 126] The specified module cannot be found" appears in import torch
What to do if No Python documentation found for ... appears in pydoc
[Python] What to do when an error related to SSL authentication is returned
What to do if an error occurs when importing numpy with VScode
What to do if you get an error when trying to load mnist
What to do if fprintd requires a password when registering your fingerprint
Notes on what to do when matplotlib scatter () / scatter3d () does not work
What to do if you get an error when installing Dlib (Ubuntu)
[OSX] [pyenv] What to do when an SSL error occurs in pip
What to do when psycopg2 throws an error when pipenv lock under Pipenv environment
What to do if you get an error when trying to send a message in tasks.loop () immediately after startup
What I referred to when studying tkinter
What to do after installing Linux (Ubuntu)
Let's summarize what you want to do.
Example of what to do when the sample script does not work (OpenCV-Python)
What to do when SSL error occurs in pip in Windows10, miniconda, VScode environment
What to do when xlrd.biffh.XLRDError: Unsupported format, or corrupt file: Expected BOF record;
[Ubuntu 18.04 LTS] What to do when the screen resolution cannot be selected [NVIDIA]