question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. Itย collects links to all the places you might be looking at while hunting down a tough bug.

And, if youโ€™re still stuck at the end, weโ€™re happy to hop on a call to see how we can help out.

timed_out_connections - dictionary changed size during iteration

See original GitHub issue

โ“ Iโ€™m submitting a โ€ฆ

  • ๐Ÿž bug report
  • ๐Ÿฃ feature request
  • โ“ question about the decisions made in the repository

๐Ÿž Describe the bug. What is the current behavior? Traceback in the logs:

Traceback (most recent call last):
  File "/opt/lib/python3.8/site-packages/cheroot/server.py", line 1795, in serve
    self.tick()
  File "/opt/lib/python3.8/site-packages/cheroot/server.py", line 2030, in tick
    self.connections.expire()
  File "/opt/lib/python3.8/site-packages/cheroot/connections.py", line 107, in expire
    for sock_fd, conn in timed_out_connections:
  File "/opt/lib/python3.8/site-packages/cheroot/connections.py", line 102, in <genexpr>
    timed_out_connections = (
  File "/opt/lib/python3.8/_collections_abc.py", line 743, in __iter__
RuntimeError: dictionary changed size during iteration

โ“ What is the motivation / use case for changing the behavior?

๐Ÿ’ก To Reproduce

๐Ÿ’ก Expected behavior

๐Ÿ“‹ Details

๐Ÿ“‹ Environment

  • Cheroot version: 8.4.4
  • CherryPy version: 18.6.0 (if applicable)
  • Python version: 3.8.X
  • OS: NAS
  • Browser: all

๐Ÿ“‹ Additional context

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:6
  • Comments:12 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
Safihrecommented, Aug 13, 2020

@webknjaz I can now confirm this was introduced between 8.4.4 and 8.4.2, because I just updated cheroot on my own system and am also getting these problems now!

1reaction
cyraxjoecommented, Aug 24, 2020

The issue is back from the depths of concurrency land. https://github.com/cherrypy/cheroot/issues/317 @webknjaz do you prefer to keep this issue closed and use the new one?

Read more comments on GitHub >

github_iconTop Results From Across the Web

dictionary changed size during iteration" error? - Stack Overflow
The Python "RuntimeError: dictionary changed size during iteration" occurs when we change the size of a dictionary when iterating over it. ยท To...
Read more >
RuntimeError: dictionary changed size during iteration
The Python "RuntimeError: dictionary changed size during iteration" occurs when we change the size of a dictionary when iterating over it.
Read more >
Filtering Dictionary In Python 3. โ€œRuntimeError - codeburst
RuntimeError : Dictionary changed size during iterationโ€, Python slaps you in your face when you try to add/remove entries in dict object during...
Read more >
Dictionary Changed Size During Iteration: Its Origins and Fixes
The dictionary changed size during iteration error occurs in inaccurate executions with iterating dictionaries. Click here to learn how to get rid of...
Read more >
Runtimeerror: Dictionary Changed Size During Iteration
The runtimeerror: dictionary changed size during iteration occurs whenever you modify entries in a dictionary object during iteration.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found