circuitpython: Repeated Socket Failures with recent builds

CircuitPython version

This issue first occurs with this build and is present on all later builds.
Adafruit CircuitPython 9.0.0-beta.0-19-g7ba62bb1cb on 2024-02-07; Adafruit Feather ESP32S3 4MB Flash 2MB PSRAM with ESP32S3

which was from this commit
https://github.com/adafruit/circuitpython/commit/7ba62bb1cb6a52eec7d91d4b48ce3063d0502de7

Code/REPL

import binascii
import io
import busio
import os
import ssl
import time
import board
import socketpool
import wifi
import adafruit_requests
from adafruit_io.adafruit_io import IO_HTTP, AdafruitIO_RequestError

aio_username = os.getenv('AIO_USERNAME')
aio_key = os.getenv('AIO_KEY')
i2c_bus=busio.I2C(scl=board.SCL,sda=board.SDA)


pool = socketpool.SocketPool(wifi.radio)

requests = adafruit_requests.Session(pool, ssl.create_default_context())

# Initialize an Adafruit IO HTTP API object
io = IO_HTTP(os.getenv("AIO_USERNAME"), os.getenv("AIO_KEY"), requests)

# Adafruit IO feed configuration
try:
    # Get the 'camera' feed from Adafruit IO
    feed_camera = io.get_feed("esp32s3eye")
except AdafruitIO_RequestError:
    # If no 'camera' feed exists, create one
    feed_camera = io.create_new_feed("esp32s3eye")
print("got feeds")

Behavior

Adafruit CircuitPython 9.0.0-beta.0-19-g7ba62bb1cb on 2024-02-07; Adafruit Feather ESP32S3 4MB Flash 2MB PSRAM with ESP32S3

import aio Traceback (most recent call last): File “<stdin>”, line 1, in <module> File “aio.py”, line 29, in <module> File “adafruit_io/adafruit_io.py”, line 748, in get_feed File “adafruit_io/adafruit_io.py”, line 578, in _get File “adafruit_requests.py”, line 752, in get File “adafruit_requests.py”, line 716, in request OutOfRetries: Repeated socket failures

Description

The failure occurs on this line: feed_camera = io.get_feed("esp32s3eye")

The test code works for earlier builds but fails for any after this time.

Adafruit CircuitPython 9.0.0-beta.0-17-gcc235061ef on 2024-02-07; Adafruit Feather ESP32S3 4MB Flash 2MB PSRAM with ESP32S3
>>> import aio
got feeds
>>> 

There don’t appear to be any corresponding changes to the adafruit_io or adafruit_requests libraries.

Also tested with same results on a memento (adafruit_esp32s3_camera) and espressif_esp32s3_eye

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created 5 months ago
  • Comments: 16 (2 by maintainers)

Commits related to this issue

Most upvoted comments

see previous comment for re-open rationale

@justmobilize Please file a new issue for the api.github.com issue. It isn’t memory related like I suspect this camera + IO issue is.