Restrict the memory limit for a process / file
I am working on vpslinks cent OS, I have an issue that my cron job file is written in python and its heavy enough to eat almost all the system memory due to which other services went down like phpmyadmin and control panel.
I am interested in having a solution to restrict the total memory that the file may use .
I looked for some forums and Google too for the issue but not satisfied. Though I am really very new to Linux so will appreciate if someone can give me a good step by step solution for the issue.
File name: mycron.py
Total mem to asign: 100MB
Please write the command to do so either on shell or if I need to add some entry in limits.conf file ?