0

My Symfony website has just started to show the following error:

ErrorException: Warning: session_start(): open (/tmp/sess_4h4kjh4ui4h478h48h44g02,O_RDWR) failed:No space left on device(28) in /var/www/website/symfony/src/symfony/component/HttpFoundation/SessionStorage/NativeSessionStorage.php line 87

I believe this is because the servers /tmp directory is on another partition which is full. What is the best thing to do in this situation? My server never gets rebooted so is there a manual way to delete these files? Or perhaps there is a way to increase its partition size?

Will removing these tmp files stop my website from working?

1

1 Answer 1

1

The following command should delete any file in /tmp, name of which is starting with "sess_", created or modified longer than 7 days ago. Any session state file persisting longer than 7 days, is quite unusual in my opinion and deletion of it should not cause any problems. But you should be the judge of how many days worth of those files you want to keep, by changing 7 to some other number in the command:

find /tmp -name "sess_*" -mtime +7 | xargs rm

1
  • I would also recommend moving the session files into a virtual host specific directory and setting up a cronjob to delete them if this is a production server. May 15, 2013 at 7:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .