{"id":437,"date":"2014-07-29T21:30:22","date_gmt":"2014-07-29T21:30:22","guid":{"rendered":"https:\/\/qbytes.cloud\/?p=437"},"modified":"2014-07-29T21:30:22","modified_gmt":"2014-07-29T21:30:22","slug":"php-sessions-causing-error","status":"publish","type":"post","link":"https:\/\/www.qbytes.cloud\/index.php\/2014\/07\/29\/php-sessions-causing-error\/","title":{"rendered":"PHP Sessions causing Error"},"content":{"rendered":"<p>Currently your messages log is filling up with errors and the system is unstable. Check the message log:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ server# tail -f \/var\/log\/messages\nJul 28 08:57:30 mail kernel: EXT4-fs warning (device sda3): ext4_dx_add_entry: Directory index full!\n\n<\/pre>\n<p>Check the sessions directory<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n $ server# php -i | grep session.save_path\nsession.save_path =&gt; \/var\/lib\/php\/session =&gt; \/var\/lib\/php\/session\n<\/pre>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\n$ server# du -shcx \/var\/lib\/php\/session\n1000.0M    \/var\/lib\/php\/session\n1000.0M    total\n\n<\/pre>\n<p>A cron job similar to the following ran every day, or periodically, should prevent those files from accumulating.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\n# find \/var\/lib\/php\/session -type d -mtime -15 -delete\n\n<\/pre>\n<p>Manually<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# find \/var\/lib\/php\/session -depth -mindepth 1 -maxdepth 1 -type f -cmin +120 -delete;\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Currently your messages log is filling up with errors and the system is unstable. Check the message log: $ server# tail -f \/var\/log\/messages Jul 28 08:57:30 mail kernel: EXT4-fs warning (device sda3): ext4_dx_add_entry: Directory index full! Check the sessions directory $ server# php -i | grep session.save_path session.save_path =&gt; \/var\/lib\/php\/session =&gt; \/var\/lib\/php\/session $ server# du &#8230; <a title=\"PHP Sessions causing Error\" class=\"read-more\" href=\"https:\/\/www.qbytes.cloud\/index.php\/2014\/07\/29\/php-sessions-causing-error\/\" aria-label=\"Read more about PHP Sessions causing Error\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,21,39,47],"tags":[],"class_list":["post-437","post","type-post","status-publish","format-standard","hentry","category-administration","category-cron","category-find","category-hardware"],"_links":{"self":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/437","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/comments?post=437"}],"version-history":[{"count":0,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/437\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/media?parent=437"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/categories?post=437"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/tags?post=437"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}