Find the answer to your Linux question:
Results 1 to 2 of 2
Hello All, 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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2008
    Posts
    1

    Restrict the memory limit for a process / file


    Hello All,

    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 ?


    Regards
    Junaid

  2. #2
    Just Joined! cheapscotchron's Avatar
    Join Date
    Dec 2008
    Location
    swamps of jersey
    Posts
    68
    mjunaiddar,

    what is the application trying to accomplish? I would suggest you investigate why it is consuming so much memory before trying a "quick fix". There are tools available to help you find the problem.

    LShift Ltd. Tracing Python memory leaks

    CSR

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •