RuntimeError: dictionary changed size during iteration

Sophana K <[email protected]> Wed, 28 Nov 2012 12:10:47 +0100
Newsgroups gmane.comp.python.webware
Message-ID <CADP5dB5eDM8qGijqv2oKcdV6B87YHmu=ETd3StxKimhgbubj2w@mail.gmail.com>
--===============1673850417945051787==
Content-Type: multipart/alternative; boundary=20cf302669f2f4159e04cf8c3752

--20cf302669f2f4159e04cf8c3752
Content-Type: text/plain; charset=ISO-8859-1

Hi

I just upgraded to webware-1.1, and get some errors (about every day) in
the session dynamic store intervalSweep method.

Here is the traceback
 File "/home/sophana/src/env1/Webware-1.1/WebKit/Tasks/SessionTask.py",
line 13, in run
    self._sessionstore.cleanStaleSessions(self)
  File "/home/sophana/src/env1/Webware-1.1/WebKit/SessionDynamicStore.py",
line 264, in cleanStaleSessions
    self.intervalSweep()
  File "/home/sophana/src/env1/Webware-1.1/WebKit/SessionDynamicStore.py",
line 288, in intervalSweep
    for key in self._memoryStore:
RuntimeError: dictionary changed size during iteration

Look like another thread could be changing the _memoryStore during this
iteration.
Should I change to
for key in list(self._memoryStore):
?

Regards
Sophana

--20cf302669f2f4159e04cf8c3752
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hi<br><br>I just upgraded to webware-1.1, and get some errors (about every =
day) in the session dynamic store intervalSweep method.<br><br>Here is the =
traceback<br>=A0File &quot;/home/sophana/src/env1/Webware-1.1/WebKit/Tasks/=
SessionTask.py&quot;, line 13, in run<br>
=A0=A0=A0 self._sessionstore.cleanStaleSessions(self)<br>=A0 File &quot;/ho=
me/sophana/src/env1/Webware-1.1/WebKit/SessionDynamicStore.py&quot;, line 2=
64, in cleanStaleSessions<br>=A0=A0=A0 self.intervalSweep()<br>=A0 File &qu=
ot;/home/sophana/src/env1/Webware-1.1/WebKit/SessionDynamicStore.py&quot;, =
line 288, in intervalSweep<br>
=A0=A0=A0 for key in self._memoryStore:<br>RuntimeError: dictionary changed=
 size during iteration<br><br>Look like another thread could be changing th=
e _memoryStore during this iteration.<br>Should I change to <br>for key in =
list(self._memoryStore):<br>
?<br><br>Regards<br>Sophana<br>

--20cf302669f2f4159e04cf8c3752--


--===============1673850417945051787==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
Keep yourself connected to Go Parallel: 
INSIGHTS What's next for parallel hardware, programming and related areas?
Interviews and blogs by thought leaders keep you ahead of the curve.
http://goparallel.sourceforge.net
--===============1673850417945051787==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Webware-discuss mailing list
Webware-discuss-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/webware-discuss

--===============1673850417945051787==--