Python multiprocessing - Debugging OSError: [Errno 12] Cannot allocate memory

后端 未结 2 1760
说谎
说谎 2021-01-02 10:10

I\'m facing the following issue. I\'m trying to parallelize a function that updates a file, but I cannot start the Pool() because of an OSError: [Errno 12

2条回答
  •  暖寄归人
    2021-01-02 11:07

    We had this a couple of time. According to my sys admin, there is "a bug" in unix, which will raise the same error if you are out of memory, of if your process reach the max file descriptor limit.

    We had a leak of file descriptor, and the error raising was [Errno 12] Cannot allocate memory#012OSError.

    So you should look at your script and double check if the problem is not the creation of too many FD instead

提交回复
热议问题