-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MemoryError channel recv #28
Comments
Run this test and it seems to be working well, this doesn't seem to reproduce the issue 👎 from pebble import ProcessPool
from concurrent.futures import TimeoutError
def function(foo):
return foo
def task_done(future):
try:
result = future.result() # blocks until results are ready
except TimeoutError as error:
print("Function took longer than %d seconds" % error.args[1])
except Exception as error:
print("Function raised %s" % error)
print(error.traceback) # traceback of the function
else:
print(len(result))
pool = ProcessPool(max_workers=5, max_tasks=10)
for i in xrange(10):
future = pool.schedule(function, args=['A' * (10 ** i)], timeout=20)
future.add_done_callback(task_done)
pool.close()
pool.join() |
Potential root cause for this issue? https://github.com/python/cpython/blob/2.7/Modules/_multiprocessing/pipe_connection.c#L70-L74 |
Yep, that's likely to be the culprit. The longer anser is in issue #29. |
Closing this as duplicate of #29. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While running some scans using w3af, which uses
pebble
for parsing HTML documents I getMemoryError
exceptions:Any ideas what these could be? My research leads me to believe that this could be because of large HTML files being sent through the
Pipe
, but I was unable to confirm it.Also, memory usage shouldn't be an issue, I have 64G of RAM and 64G of swap.
The text was updated successfully, but these errors were encountered: