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.

Tmp partition always full

Discussion in 'Site & Server Administration' started by Divvy, Oct 20, 2015.

  1. #1
    Hello guys,

    Maybe someone can help me...
    I was getting some errors because my tmp partition was always full since I installed mod_pagespeed in my server.
    I contacted an SysAdmin company and they increase tmp partition to 1G but without success. Than they increased to 2G and the problem continues...
    Today, I asked for a permanent fix because I cant have my websites always down because of this. The solution that they gave me was:

    But doing that, will not affect my server speed performance?

    I searched and I have found this:
    ----------------------------------
    mysql: Shall I change the mysql tmpdir from /tmp to /var/lib/mysql/tmp?
    This is not recommended. By default, /tmp will be mounted out of tmpfs and mysql will use this for extra large queries etc. Being in tmpfs means IOPS hit RAM instead of your hard drive or SSD. This improves performance and there is no real downside because the data being stored in the tmpdir is suited to volatile storage. If you are maxing out the size of your /tmp, I would recommend you write your queries to be more efficient or enlarge the size of your /tmp through fstab if you have the RAM to spare. If this solution does not work, then feel free to define your own location of tmpdir and point it towards a disk with a larger partition allocation.
    ----------------------------------

    Or am I understand this wrong and wasn't what he did? Is this safe?
    What method is more faster? Because server speed is very important for me.

    I asked this to them and they said:

    What do you guys think? Thanks :)
     
    Divvy, Oct 20, 2015 IP
  2. zacharooni

    zacharooni Well-Known Member

    Messages:
    346
    Likes Received:
    20
    Best Answers:
    4
    Trophy Points:
    120
    #2
    zacharooni, Oct 20, 2015 IP
  3. Divvy

    Divvy Well-Known Member

    Messages:
    771
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    128
    #3
    Thank you for your reply my friend.
     
    Divvy, Oct 20, 2015 IP
  4. Roger S

    Roger S Active Member

    Messages:
    46
    Likes Received:
    4
    Best Answers:
    1
    Trophy Points:
    58
    #4
    Hello,

    There are two options.

    Relocate the /tmp directory to a larger partition.


    Run a cron that will clean the sess_* files and cache_* files regularly.

    This links will help.
    ---
    http://prefetch.net/blog/index.php/2009/05/01/automating-temporary-file-cleanup-with-tmpwatch/
    https://forums.cpanel.net/threads/cron-to-clean-tmp.203701/
    ----


    This is the cron job.
    ---
    0 */4 * * * /usr/sbin/tmpwatch -am 12 /tmp
    ----


    Let me know if that helped. :)
     
    Roger S, Dec 26, 2015 IP
  5. Tahity

    Tahity Well-Known Member

    Messages:
    215
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    165
    #5
    you need to check why and what is filling the tmp space, the cleanup is not a solution to your problem just a shortcut
     
    Tahity, Jan 3, 2016 IP
  6. pwhrita

    pwhrita Active Member

    Messages:
    26
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    83
    #6
    You can install tmpwatch if its linux server. It will clear your tmp partition automatically.
     
    pwhrita, Jan 15, 2016 IP