Skip to content

Resource Warning Logs #12

Description

@jasonacox

The error logs are indicating a research warning on closed connections:

/usr/local/lib/python3.10/site-packages/openai/resources/files.py:767: ResourceWarning: unclosed <socket.socket fd=30, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('172.17.0.2', 49524), raddr=('10.0.1.25', 8000)>
  self.content = async_to_custom_streamed_response_wrapper(
Object allocated at (most recent call last):
  File "/usr/local/lib/python3.10/asyncio/base_events.py", lineno 946
    sock = socket.socket(family=family, type=type_, proto=proto)
/usr/local/lib/python3.10/asyncio/selector_events.py:710: ResourceWarning: unclosed transport <_SelectorSocketTransport fd=30 read=idle write=<idle, bufsize=0>>
  _warn(f"unclosed transport {self!r}", ResourceWarning, source=self)
Object allocated at (most recent call last):
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", lineno 61
    return _SelectorSocketTransport(self, sock, protocol, waiter,
/usr/local/lib/python3.10/asyncio/selector_events.py:710: ResourceWarning: unclosed transport <_SelectorSocketTransport fd=27 read=idle write=<idle, bufsize=0>>
  _warn(f"unclosed transport {self!r}", ResourceWarning, source=self)
Object allocated at (most recent call last):
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", lineno 61
    return _SelectorSocketTransport(self, sock, protocol, waiter,

The chatbot uses socketio to stay connected to clients and has a session disconnect handler so I'm not clear as to where this might be. Adding here for more research.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions