SQL error in front-end and back-end.

Hi guys,

We are using AWS for our website. The instance type is EC2 t2.small. And the hosted zone is U.S East North Virginia.

We have uploaded a lot of products on the website and 3 days ago received an error related to space issue.

I have spoken to my developers and everyone is saying that this is because I have exceeded the allocated data.
On the t2.small plan I’m allocated 32 GB of data.

I have no way of checking how much data I have used for storage. I have spoken to AWS tech support team and even they can’t give me that information because they don’t keep that information. They said that the premium support team will contact me in 48 hrs with more info.
But they are unable to help me and are just sending emails that have no proper information.

The error is as follows:

“Warning: Unknown: write failed: No space left on device (28) in Unknown on line 0Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php/sessions) in Unknown on line 0”

I’m unable to login the backend (Admin) as well. Sometimes I’m able to login but the category/product page does not load.

Any help/information is greatly appreciated.

Thanks

Edit: Thank you everyone for the reply.

The issue is resolved now. We have increased the EBS volume and everything works fine now.

Cheers


Related discussions:

You have to:

A) access your ec2 instance via ssh and free some space

or/and

B) increase your ebs volume and then resize your disk in your OS accordingly.

AWS support won’t take those actions as it’s your responsibility to mantain your OS.

what kind of storage volumes are you using? the instance server itself might only have a small amount (8 GB is typical, and the OS and dependencies often uses up like 6 GB of that).

A t2.small instance should have at least one EBS volume mounted. You’ll probably have to resize it.

If you’re going to run your database directly off the EC2 instance you will probably want something with more memory and IOPS than a t2.small. That will start red-lining as soon as you have more than a handful of users on it.

It might make sense to use a small RDS instance for your database. That will take a lot of load (and storage requirements) off the instance server. Check prices, RDS can get expensive but there are affordable options.

Thanks for the reply.

Can you help me do it?

Cheers

your developers are correct, and this is a PHP issue, not SQL

AWS tech support cannot help you because they do not have access to login to your machine.

wherever the PHP session save location is (/var/lib/php/sessions), it has no disk space

this location is used to store users’ session information (if they are authenticated, etc.)

you will need to have someone get into that box and figure out what is taking up so much disk space

Sorry, I would not log in to anyone’s server root account nor aws account, even if they promised they would change all password afterwards.

If you’ll manage to access your instance via ssh then try using utilities like:

  • ncdu -x /
  • mc

to find biggest files/directories and to delete or compress them.

Resizing a partition is quite more complicated, it would probably be easier to add another EBS volume and mount it under selected directory.

$250/hr i’ll do it

Thanks but the issue is resolved now. We have increased the EBS volume. Thanks anyways.

Thanks for the reply.

The issue is resolved now. We have increased the EBS volume and everything works fine now.