OSError: -32512
-
OSError: -32512 when I try
>>sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) >>sock.settimeout(5) >>s = ssl.wrap_socket(sock) OSError: -32512 -
Which firmware version are you using?
-
@abilio 1.5.0.0.b2, this doesn`t happen all the time. Actually, it rarely happens. But my application requires SSL socket connections to be made every second and sometimes after running for a while the error is thrown.
-
@Knoahlr, this error used to appear very often in previous versions. It is caused when the OS (not the GC) runs out of memory. We released some memory in version 1.5.0, and the problem seemed to disappear. Perhaps the frequency of SSL connections you're making, combined to other things you're using are creating this out of memory condition. Can you provide more information about your specific application? perhaps some code example?
Regards,
Abilio -
@abilio I was almost certain that was the case. Ive introduced gc.collect() in my loops and I think this will solve the problem.
If not, I`ll be back here for some more helpIm using a HC-SR04 Ultrasonic sensor to send distance measurements to my company`s IOT server. Sending this data requires an ssl connection.
Every time I send this data I have to create a time.ticks_us() object and set up a pin callback among other things.Thanks.
-
@abilio gc.collect() seems to have solved the problem. Had it up and running smoothly for about 30mins now.
before every ssl connection gc.mem_free() is about 37000 -39000. Before it would fall all the way to 600. -
@Knoahlr, thanks a lot for the feedback. Keep me posted in case of any change.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login