Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


WordPress - Disk Space Usage Spike shown on VPS SolusVM Control Panel
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

WordPress - Disk Space Usage Spike shown on VPS SolusVM Control Panel

ZealZeal Member
edited June 2014 in Help

Hello and greetings!

I just deleted a few unused files totaling about 4GB in size, and all of a sudden boom no more storage space.....
I haven't made any major changes to my website.
Today after I brought back my website online after the VPS was down for about 6+ hours, the VPS had 16 GB out of 20 GB after deleting some files. After a mere 2 to 3 hours ( not really sure), my VPS control panel said I used 20 GB/20 GB Hard Drive Space.

DB Size:

 ![](http://snag.gy/Fg1lC.jpg) | Seems Normal 

Hard Drive Space:

 "df -h" ![](http://snag.gy/uyAIi.jpg) 

VPS Control Panel:

1) Is it possible my host is overselling?
2) If it's not overselling, what could be causing the problem and how can I fix this?

Thank you for your help and time.

Now I am getting this: "502 Bad Gateway nginx/0.7.65", this disappears after I delete some files and clear some space.

However, I did not add any new files..... and any space I free up is quickly depleted.

Comments

  • nimdynimdy Member

    Do you have any log files or temp files filling up your hdd?

  • ZealZeal Member

    @nimdy said:
    Do you have any log files or temp files filling up your hdd?

    It's possible, but I wouldn't know. This is my first time running a wordpress website.

    I used this guide: http://lowendbox.com/blog/wordpress-cheap-vps-lowendscript/

    Could you help me out please with checking if there are log files and temp files?
    I don't think I could find any myself, I ran the df command.

    I tried rebooting.

    Thanks

  • Zeal said: Could you help me out please with checking if there are log files and temp files? I don't think I could find any myself, I ran the df command.

    ls -l /var/log/

    Is this a pretty average-to-low volume wordpress site, though? Probably not logs... might be, though.

  • du -h --max-depth=1 /

  • ZealZeal Member
    edited June 2014

    @AThomasHowe said:

     ![](http://snag.gy/CT6Ih.jpg) 

    I am going to delete all those files, but I wonder why "messages" is so large.

    Thank you.

  • J1021J1021 Member

    Zeal said: but I wonder why "messages" is so large

    Open it up and find out.

  • Uh... it's a log, so you might want to read a little bit and find out why it's so long before you blindly delete it. It might be an overzealous setting you have to disable because it's spamming your logs or maybe it's detecting attacks...

    Try tail /var/log/messages -n 100 to see the last 100 lines. Notepad++ would also open it fine.

  • nerouxneroux Member

    @serverian said:
    du -h --max-depth=1 /

    For starters

  • ZealZeal Member
    edited June 2014

    @serverian said:
    du -h --max-depth=1 /

    I ran that, and found out lot of space usage is in VAR.

     ![](http://snag.gy/PDUdW.jpg) 

    Is there any easy way to find out other than checking each file/folder one by one?

    So much to learn.

    Thank you again everyone. ^_^

  • ZealZeal Member

    @AThomasHowe said:
    Uh... it's a log, so you might want to read a little bit and find out why it's so long before you blindly delete it. It might be an overzealous setting you have to disable because it's spamming your logs or maybe it's detecting attacks...

    Try tail /var/log/messages -n 100 to see the last 100 lines. Notepad++ would also open it fine.

    Oh boy.... I deleted them all. =(

  • ZealZeal Member
    edited June 2014

    I had 11.11 GB worth of log files.

    That is amazing.

    I will run "tail /var/log/messages -n 100" next time before I delete anything. =D

    Again thanks for all your help and have a great day!

  • nerouxneroux Member

    Zeal said: I ran that, and found out lot of space usage is in VAR.

    Then run the same command there.

  • AThomasHoweAThomasHowe Member
    edited June 2014

    Change the max depth. It'll spam you though... probably best to do du -h --max-depth=1 /var if you want to see the makeup. Again, you can change the depth but it'll spam you.

    Also, use pastebin, don't post console screenshots. Or just type < pre > and </ pre > (on their own lines) before/after your log in your post to format it (without spaces).

    And I assume it'll probably happen again, @Zeal. Just be a little more proactive next time :) /var/log is where your system stores a lot of logs - a lot of the data is meaningless but it can help a lot when something goes wrong. Your problem also could just be that something is logging too much junk.

  • Next time, run:

    find /var/log -type f -regex ".*\.gz$"
    find /var/log -type f -regex ".*\.[0-9]$"
    find /var/log -type f -exec cp /dev/null {} \;
    
  • ZealZeal Member

    @serverian said:
    Next time, run:

    > find /var/log -type f -regex ".*\.gz$"
    > find /var/log -type f -regex ".*\.[0-9]$"
    > find /var/log -type f -exec cp /dev/null {} \;
    > 

    Thank you

  • ZealZeal Member

    @serverian @AThomasHowe @neroux @nimdy @1e10

    Thank you for all your previous help.

    I ran all the commands before, as someone said before it is going to be a problem again.

    The weird thing is, my logs folder is empty this time and I can not locate what is taking all the space...

    root@server1:~# du -h --max-depth=1 /
    4.9M    /bin
    290M    /usr
    4.0K    /media
    du: cannot access `/proc/2895/task/2895/fd/4': No such file or directory
    du: cannot access `/proc/2895/task/2895/fdinfo/4': No such file or directory
    du: cannot access `/proc/2895/fd/4': No such file or directory
    du: cannot access `/proc/2895/fdinfo/4': No such file or directory
    0       /proc
    4.0K    /opt
    4.0K    /home
    8.0K    /dev
    80K     /root
    4.2M    /sbin
    159M    /var
    4.0K    /boot
    4.0K    /mnt
    2.4M    /etc
    4.0K    /srv
    4.0K    /selinux
    4.0K    /tmp
    0       /sys
    13M     /lib
    473M    /
    

    Its went from 8.89 GB space used 9 hours ago to 20 GB Space used now.

    I will try a reboot.

  • ZealZeal Member

    I deleted the entire cache folder and logs folder contents.
    However, when i rebooted the server, nginx won't start or boot up.

  • ZealZeal Member

    bash service nginx start
    Starting nginx: [alert]: could not open error log file: open() "/var/log/nginx/error.log" failed (2: No such file or directory)
    the configuration file /etc/nginx/nginx.conf syntax is ok
    2014/06/22 07:52:32 [emerg] 1275#0: open() "/var/log/nginx/error.log" failed (2: No such file or directory)
    configuration file /etc/nginx/nginx.conf test failed

  • @Zeal said:

    Nginx can't find your log file, use this command to create one: touch /var/log/nginx/error.log

  • ZealZeal Member
    edited June 2014

    @joodle said:
    Nginx can't find your log file, use this command to create one: touch /var/log/nginx/error.log

    Thanks @joodle, that works.
    I see it needs that file to start, so i just created a blank one. So odd. why would it want to open a log file.

  • Zeal said: So odd. why would it want to open a log file.

    Maybe because nginx wants to write to the file?

  • nerouxneroux Member

    joodle said: Maybe because nginx wants to write to the file?

    Then it should simply create it ;).

Sign In or Register to comment.