Skip to content

Dendrite: log ClientOSError as Debug#2770

Merged
thewhaleking merged 7 commits intoopentensor:stagingfrom
Thykof:feat--silent-aiohttp.ClientOSError
Apr 17, 2025
Merged

Dendrite: log ClientOSError as Debug#2770
thewhaleking merged 7 commits intoopentensor:stagingfrom
Thykof:feat--silent-aiohttp.ClientOSError

Conversation

@Thykof
Copy link
Contributor

@Thykof Thykof commented Mar 26, 2025

Requirements for Adding, Changing, or Removing a Feature

  • Fill out the template below. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • The pull request must contribute a change that has been endorsed by the maintainer team. See details in the template below.
  • The pull request must update the test suite to exercise the updated functionality.
  • After you create the pull request, all status checks must be pass before a maintainer reviews your contribution.

Description of the Change

This change if on the filter of the error in the dendrite. The goal is to log with level debug a larger scope of errors.

Currently aiohttp.ClientConnectorError is log as error, but some aiohttp.ClientOSError are sometimes raised.

aiohttp.ClientOSError is mother of aiohttp.ClientConnectorError.

I propose to log as level debug all aiohttp.ClientOSError.

Alternate Designs

Possible Drawbacks

We might miss some error that should bring attention.

Verification Process

Release Notes

Dendrite: log ClientOSError as Debug

@Thykof Thykof changed the title feat: silent aiohttp.ClientOSError Dendrite: log ClientOSError as Debug Mar 26, 2025
@basfroman
Copy link
Collaborator

basfroman commented Apr 1, 2025

Hey @Thykof, please rebase this PR to staging branch and add tests for cover this case and we'll review this PR.
Thank you for contribution!

@thewhaleking thewhaleking changed the base branch from master to staging April 9, 2025 13:21
@thewhaleking
Copy link
Contributor

Hi @Thykof ,
I'm a little confused here on why we would want to do this? Are you regularly seeing lots of ClientOSError in the error log?

@Thykof
Copy link
Contributor Author

Thykof commented Apr 9, 2025

Hi @Thykof , I'm a little confused here on why we would want to do this? Are you regularly seeing lots of ClientOSError in the error log?

Hi, yes we are seeing a lot of

2025-04-09 08:40:22.556 |      DEBUG       | bittensor:dendrite.py:262 | ClientConnectorError#74a8604c-ee0b-4b5f-87c9-a310a31d6585: Cannot connect to host ip:port ssl:default [Connect call failed ('ip', port)]
2366
2025-04-09 08:40:22
2025-04-09 08:40:22.556 |      TRACE       | bittensor:dendrite.py:346 | dendrite | <-- | 4217 B | Simulation | 5F2CsUDVbRbVMXTh9fAzF9GacjVX7UapvRxidrxe7z8BYckQ | ip:port | 503 | Service unavailable at ip:port/Simulation

and they are treating as DEBUG

but sometimes we have similar network error treated as ERROR:

ERROR       | bittensor:dendrite.py:264 | ClientOSError#36c69b08-08b7-4dc9-9b5f-044e88149c7e: [Errno None] Can not write request body for http://ip:port/Simulation

I couldn't find time to have a look at the unit test yet.

@basfroman
Copy link
Collaborator

I couldn't find time to have a look at the unit test yet.

Don't worry. There is no rush.

@thewhaleking thewhaleking merged commit ac475f0 into opentensor:staging Apr 17, 2025
122 of 123 checks passed
@ibraheem-abe ibraheem-abe mentioned this pull request Apr 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants