Skip to content

Conversation

@annagrin
Copy link
Contributor

@annagrin annagrin commented Jul 15, 2021

Limit number of simultaneous connections to prevent SocketExceptions.

Restricting number of connections on the client to 200 causes all the extra connections
to buffer, and eventually connect when the number of active connections drops below
the limit. This prevents SocketExceptions that cause flakes in the CI.

Removing the maxConnectionsPerHost on the client in new tests will repro the issue.

Hopefully fixes flaky behavior in DDR as well (pending performance measurements).

Closes: #1345

@google-cla google-cla bot added the cla: yes label Jul 15, 2021
Copy link
Member

@grouma grouma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain how this addresses the issue?

@annagrin
Copy link
Contributor Author

Can you explain how this addresses the issue?

I run some experiments (see newly added tests) and was able to repro a bunch of broken sockets if I tried to read a few hundred files simultaneously on my local machine. I suppose the machine just runs out of sockets at some point (or we hit some bug the http library).

Restricting number of connections on the client to 200 means that all the extra connections will get buffered and eventually connected when the number of active connections drops below the limit.

Removing the maxConnectionsPerHost on the client in new tests will repro the issue.
Btw we seem to have similar issues in build CI - I added some tests with the same result there as well:

dart-lang/build#3144

@annagrin annagrin force-pushed the annagrin/fix_socket_errors branch from 10c4f25 to dae80db Compare July 16, 2021 18:29
@annagrin annagrin force-pushed the annagrin/fix_socket_errors branch from dae80db to 2c05036 Compare July 17, 2021 00:20
Anna Gringauze added 5 commits July 19, 2021 17:18
- remove tests waiting for COMPILER_UPDATE_DEPENDENCIES event
  since there is no way to start listening to debugger events
  before it is emitted, so the test was faiing randomly.

- change expression evaluation tests to expect their events
  eventually, skipping potential COMPILER_UPDATE_DEPENDENCIES
  event that sometimes would get be picked up by the listener
  if it happened later that the listener setup.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Numerous CI flakes and failures due to failure to load dill files

2 participants