{"id":2664,"date":"2018-01-08T18:15:48","date_gmt":"2018-01-09T02:15:48","guid":{"rendered":"http:\/\/www.wellgolly.com\/?p=2664"},"modified":"2018-01-08T18:15:48","modified_gmt":"2018-01-09T02:15:48","slug":"running-out-of-space","status":"publish","type":"post","link":"https:\/\/www.wellgolly.com\/?p=2664","title":{"rendered":"Running out of space."},"content":{"rendered":"<p>A server that I administer from time to time has been running out of space. I manually deleted all of the logs and freed up a ton of space. I turns out that there are lots of wget calls on this server and as more customers were added the number of lines in the Apache logs increased tremendously.<\/p>\n<p>The access log was rotated weekly but it gets to be very large and on an old machine with only 70GB total, it adds up. I changed the log rotation in \/etc\/logrotate.d\/apache2 to daily from weekly and keep them for 1 day instead of 26 weeks. The free space has remained at 10% since I made the change.<\/p>\n<p><pre><code class=\"preserve-code-formatting\">\n\/var\/log\/apache2\/*.log {\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;daily\n&nbsp;&nbsp;missingok\n&nbsp;&nbsp;rotate 1\n&nbsp;&nbsp;compress\n&nbsp;&nbsp;delaycompress\n&nbsp;&nbsp;notifempty\n&nbsp;&nbsp;create 640 root adm\n&nbsp;&nbsp;sharedscripts\n&nbsp;&nbsp;postrotate\n&nbsp;&nbsp;&nbsp;&nbsp;if [ -f &quot;`. \/etc\/apache2\/envvars ; echo ${APACHE_PID_FILE:-\/var\/run\/apache2.pid}`&quot; ]; then\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\/etc\/init.d\/apache2 reload &gt; \/dev\/null\n&nbsp;&nbsp;&nbsp;&nbsp;fi\n&nbsp;&nbsp;endscript\n}<\/code><\/pre><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A server that I administer from time to time has been running out of space. I manually deleted all of the logs and freed up a ton of space. I turns out that there are lots of wget calls on this server and as more customers were added the number of lines in the Apache &hellip; <a href=\"https:\/\/www.wellgolly.com\/?p=2664\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Running out of space.<\/span><\/a><\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-2664","post","type-post","status-publish","format-standard","hentry","category-computers"],"_links":{"self":[{"href":"https:\/\/www.wellgolly.com\/index.php?rest_route=\/wp\/v2\/posts\/2664","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wellgolly.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wellgolly.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wellgolly.com\/index.php?rest_route=\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wellgolly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2664"}],"version-history":[{"count":0,"href":"https:\/\/www.wellgolly.com\/index.php?rest_route=\/wp\/v2\/posts\/2664\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wellgolly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2664"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wellgolly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2664"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wellgolly.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2664"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}