Memory error with Python multiprocessing pool.map The Next CEO of Stack OverflowPython 3.3...

Is the offspring between a demon and a celestial possible? If so what is it called and is it in a book somewhere?

Can you teleport closer to a creature you are Frightened of?

Why did the Drakh emissary look so blurred in S04:E11 "Lines of Communication"?

Gauss' Posthumous Publications?

How can I prove that a state of equilibrium is unstable?

Is a distribution that is normal, but highly skewed, considered Gaussian?

How to implement Comparable so it is consistent with identity-equality

How do I secure a TV wall mount?

My ex-girlfriend uses my Apple ID to login to her iPad, do I have to give her my Apple ID password to reset it?

Compilation of a 2d array and a 1d array

Why was Sir Cadogan fired?

Why can't we say "I have been having a dog"?

Why did early computer designers eschew integers?

MT "will strike" & LXX "will watch carefully" (Gen 3:15)?

Compensation for working overtime on Saturdays

A hang glider, sudden unexpected lift to 25,000 feet altitude, what could do this?

How can I separate the number from the unit in argument?

Mathematica command that allows it to read my intentions

Is it a bad idea to plug the other end of ESD strap to wall ground?

How can a day be of 24 hours?

Are British MPs missing the point, with these 'Indicative Votes'?

What is the difference between 'contrib' and 'non-free' packages repositories?

Could you use a laser beam as a modulated carrier wave for radio signal?

Traveling with my 5 year old daughter (as the father) without the mother from Germany to Mexico



Memory error with Python multiprocessing pool.map



The Next CEO of Stack OverflowPython 3.3 (Using IDLE)Is this port of Scapy compatible with Python 3.x?Regular winXP crashes, suspected memory, error 0xc0000017 among othersMemory or Memory Controller issueHow to install pyinstaller in Python 3.4.3Error with Python win32comUnable to unistall python 3.5 on windowsPyinstaller “Failed to execute script” error with --noconsole optionPython: nmap.PortScanner() Path errorPython construct build Error












0















I have a function that I'm trying to run in parallel. I suspect that there is a memory leak somewhere, but I'm unsure about how to fix this.



Error message:



Exception in thread Thread-22:
Traceback (most recent call last):
File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/multiprocessing/pool.py", line 405, in _handle_workers
pool._maintain_pool()
File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/multiprocessing/pool.py", line 246, in _maintain_pool
self._repopulate_pool()
File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/multiprocessing/pool.py", line 239, in _repopulate_pool
w.start()
File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/multiprocessing/process.py", line 105, in start
self._popen = self._Popen(self)
File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/multiprocessing/context.py", line 277, in _Popen
return Popen(process_obj)
File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/multiprocessing/popen_fork.py", line 19, in __init__
self._launch(process_obj)
File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/multiprocessing/popen_fork.py", line 66, in _launch
self.pid = os.fork()
OSError: [Errno 12] Cannot allocate memory


How I use multiprocessing:



def main():
with Pool(processes = 92) as p:
p.map(mapVins, range(0, 33000))
p.close()
p.join()
if __name__ == '__main__':
main()


The error shows up once for just one process, then all processes die until the kernel just hangs. Also before running the function, note that I have about 40GB / 256GB of RAM used.










share|improve this question









New contributor




staimour is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    0















    I have a function that I'm trying to run in parallel. I suspect that there is a memory leak somewhere, but I'm unsure about how to fix this.



    Error message:



    Exception in thread Thread-22:
    Traceback (most recent call last):
    File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
    File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
    File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/multiprocessing/pool.py", line 405, in _handle_workers
    pool._maintain_pool()
    File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/multiprocessing/pool.py", line 246, in _maintain_pool
    self._repopulate_pool()
    File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/multiprocessing/pool.py", line 239, in _repopulate_pool
    w.start()
    File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/multiprocessing/process.py", line 105, in start
    self._popen = self._Popen(self)
    File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/multiprocessing/context.py", line 277, in _Popen
    return Popen(process_obj)
    File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/multiprocessing/popen_fork.py", line 19, in __init__
    self._launch(process_obj)
    File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/multiprocessing/popen_fork.py", line 66, in _launch
    self.pid = os.fork()
    OSError: [Errno 12] Cannot allocate memory


    How I use multiprocessing:



    def main():
    with Pool(processes = 92) as p:
    p.map(mapVins, range(0, 33000))
    p.close()
    p.join()
    if __name__ == '__main__':
    main()


    The error shows up once for just one process, then all processes die until the kernel just hangs. Also before running the function, note that I have about 40GB / 256GB of RAM used.










    share|improve this question









    New contributor




    staimour is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      0












      0








      0








      I have a function that I'm trying to run in parallel. I suspect that there is a memory leak somewhere, but I'm unsure about how to fix this.



      Error message:



      Exception in thread Thread-22:
      Traceback (most recent call last):
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/threading.py", line 916, in _bootstrap_inner
      self.run()
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/threading.py", line 864, in run
      self._target(*self._args, **self._kwargs)
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/multiprocessing/pool.py", line 405, in _handle_workers
      pool._maintain_pool()
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/multiprocessing/pool.py", line 246, in _maintain_pool
      self._repopulate_pool()
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/multiprocessing/pool.py", line 239, in _repopulate_pool
      w.start()
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/multiprocessing/process.py", line 105, in start
      self._popen = self._Popen(self)
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/multiprocessing/context.py", line 277, in _Popen
      return Popen(process_obj)
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/multiprocessing/popen_fork.py", line 19, in __init__
      self._launch(process_obj)
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/multiprocessing/popen_fork.py", line 66, in _launch
      self.pid = os.fork()
      OSError: [Errno 12] Cannot allocate memory


      How I use multiprocessing:



      def main():
      with Pool(processes = 92) as p:
      p.map(mapVins, range(0, 33000))
      p.close()
      p.join()
      if __name__ == '__main__':
      main()


      The error shows up once for just one process, then all processes die until the kernel just hangs. Also before running the function, note that I have about 40GB / 256GB of RAM used.










      share|improve this question









      New contributor




      staimour is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      I have a function that I'm trying to run in parallel. I suspect that there is a memory leak somewhere, but I'm unsure about how to fix this.



      Error message:



      Exception in thread Thread-22:
      Traceback (most recent call last):
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/threading.py", line 916, in _bootstrap_inner
      self.run()
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/threading.py", line 864, in run
      self._target(*self._args, **self._kwargs)
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/multiprocessing/pool.py", line 405, in _handle_workers
      pool._maintain_pool()
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/multiprocessing/pool.py", line 246, in _maintain_pool
      self._repopulate_pool()
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/multiprocessing/pool.py", line 239, in _repopulate_pool
      w.start()
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/multiprocessing/process.py", line 105, in start
      self._popen = self._Popen(self)
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/multiprocessing/context.py", line 277, in _Popen
      return Popen(process_obj)
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/multiprocessing/popen_fork.py", line 19, in __init__
      self._launch(process_obj)
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/multiprocessing/popen_fork.py", line 66, in _launch
      self.pid = os.fork()
      OSError: [Errno 12] Cannot allocate memory


      How I use multiprocessing:



      def main():
      with Pool(processes = 92) as p:
      p.map(mapVins, range(0, 33000))
      p.close()
      p.join()
      if __name__ == '__main__':
      main()


      The error shows up once for just one process, then all processes die until the kernel just hangs. Also before running the function, note that I have about 40GB / 256GB of RAM used.







      memory crash python3 parallel-processing






      share|improve this question









      New contributor




      staimour is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      staimour is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited 2 hours ago









      karel

      9,34493339




      9,34493339






      New contributor




      staimour is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 3 hours ago









      staimourstaimour

      11




      11




      New contributor




      staimour is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      staimour is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      staimour is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          0






          active

          oldest

          votes












          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });






          staimour is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1420183%2fmemory-error-with-python-multiprocessing-pool-map%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          staimour is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          staimour is a new contributor. Be nice, and check out our Code of Conduct.













          staimour is a new contributor. Be nice, and check out our Code of Conduct.












          staimour is a new contributor. Be nice, and check out our Code of Conduct.
















          Thanks for contributing an answer to Super User!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1420183%2fmemory-error-with-python-multiprocessing-pool-map%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Why not use the yoke to control yaw, as well as pitch and roll? Announcing the arrival of...

          Couldn't open a raw socket. Error: Permission denied (13) (nmap)Is it possible to run networking commands...

          VNC viewer RFB protocol error: bad desktop size 0x0I Cannot Type the Key 'd' (lowercase) in VNC Viewer...