classification
Title: module 'resource' has no attribute 'RLIMIT_VMEM'
Type: crash Stage:
Components: Versions: Python 3.8
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Titusz Ban
Priority: normal Keywords:

Created on 2020-05-25 18:09 by Titusz Ban, last changed 2020-05-25 18:09 by Titusz Ban.

Messages (1)
msg369902 - (view) Author: Titusz Ban (Titusz Ban) Date: 2020-05-25 18:09
While trying to limit the virtual memory used by a process, using

import resource
MAX_VIRTUAL_MEMORY = 1 * 1024 * 1024
resource.setrlimit(resource.RLIMIT_VMEM, (MAX_VIRTUAL_MEMORY, MAX_VIRTUAL_MEMORY))

The following error occurred:

AttributeError: module 'resource' has no attribute 'RLIMIT_VMEM'

This is on Ubuntu 16.04 running inside WSL. on Python 3.8.2.
History
Date User Action Args
2020-05-25 18:09:07Titusz Bancreate