0

My application is showing error:

Magento 2.2.2 - Warning: SessionHandler::read() No space left on device (28) in /var/www/html/vendor/magento/framework/Session/SaveHandler/Native.php on line 22

I searched for information and many of them said it was lacking server space, but my server has 3GB of space.

enter image description here

Memory and CPU usage information also appears to be normal

enter image description here

But when I execute:

bin/magento cache:clear

everything returns to normal and my application works again.

Magento is running on an AWS EC2 T2.Medium 16GB disk drive and 4GB RAM.

Folders and files are set according to Magento documentation:

sudo find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} + && sudo find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} + && sudo chown -R :apache . && sudo chmod u+x bin/magento
  • Can you run df command before and after cleaning the cache – Raj Mohan R Apr 12 at 11:17
  • @RajMohanR Running cache: clear changed from 3.4GB to 3.5GB – Diego Queiroz Apr 12 at 11:25
  • @DiegoQueiroz your issue is your server is running out of space, once the cache is set its unable write anything else hence when you clear the cache it goes away. your deleteing files which is freeing up space on the device but the moment you go back to the site you are filling that cache folder back up – Dava Gordon Apr 12 at 11:38
  • @DavaGordon but my server has 3.5GB of free disk space. – Diego Queiroz Apr 12 at 11:58
  • @DiegoQueiroz that may be but when your server performs certain tasks it used additional space to run processes in the background it may only use them temporary but going off your error i can confirm your server does not have enough space to run its tasks to confirm this i would suggest updating your stroage to 20GB and seeing if the issue persists – Dava Gordon Apr 12 at 12:01
1

This is a storage issue, as per my earlier suggestion. recommendation for this is/was to update storage from 16gb to 20gb if anyone else has this issue i suggest this is the first place you look .

Why this happen even after space on the server:

when your server performs certain tasks it used additional space to run processes in the background it may only use them temporarily but going off your error so the server does not have enough space to run its tasks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.