Hello,
Using urequests library on a LoPy: I get OSError -78 and errno 9 when doing get/post https requests. It only happens after running the application for several hours. Can anyone shed some light as to what OSError -78 stands for? and what errno 9 (Ebadf) means? Or maybe point me to the right direction?
Thank you!
Socket error -78 and errorno 9
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Socket error -78 and errorno 9
Queries regarding PyCom products are best raised in their forum https://forum.pycom.io/. As a very general point many issues involving failures of network devices after long periods of time proved to be down to not closing sockets. This results in socket instances proliferating until RAM is exhausted.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
-
- Posts: 2
- Joined: Tue Jun 20, 2017 8:08 am
Re: Socket error -78 and errorno 9
Thank you for replying. I have posted to the Pycom forum, hopefully someone will answer. The reason I posted here as well is because I assume these errors are defined in Micropython as a whole so I could get an answer to what they mean. Since the urequests library handles the opening and closing of the sockets, I am sure there are no open sockets left after an HTTP request.
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Socket error -78 and errorno 9
Error no. 9 is a standard Python code for a bad file number (defined in errno.py). Maybe -78 is something PyCom specific?
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.