1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

client_body_temp directory filling up...

Discussion in 'Nginx' started by RaceDirector, Apr 10, 2013.

  1. #1
    Howdy

    I am running on a VPS with nginx installed via centminmod. Today I have errors pertaining to my disk allocation being exceeded which turned out to be my nginx client_body_temp directory getting huge.

    Just wanted to check it is safe to remove all the files in the specified directory and doing that won't cause any undue damage to my install....

    Cheers
     
    Solved! View solution.
    RaceDirector, Apr 10, 2013 IP
  2. MilesWeb

    MilesWeb Well-Known Member

    Messages:
    869
    Likes Received:
    35
    Best Answers:
    7
    Trophy Points:
    173
    #2
    Hi there, Are these the files/folders being created under the /tmp directory ? If yes, good to remove them. Else, let us know the location as to where they are being created.
     
    MilesWeb, Apr 10, 2013 IP
  3. #3
    Yes it is perfectly ok to remove the temp file. However this is not normal that your temp folder should fill up. Investigate this issue and in the meanwhile you could just setup a cronjob to clear out the files regularly instead of waiting for it to happen.

    Sometimes there is no way around and many applications use temp directory and not cleanup. Cronjobs can help, but what if you still run out earlier. The safest method I have found is to mount some amount of your memory as ramdisk. say about 10-15%. Then use this mounted disk as temp folder in various configuration of web server and php etc. The ramdisk automatically pushes out older content to make space for new content. Also ramdisk clears all content on reboot so try not to put subdirectories as config.

    Specially helpful for temp file uploads, cache files or session files
     
    vangel, Apr 10, 2013 IP