Troubleshooting Common Website Issues on Linux Server

In this tutorial, we are going to explain to you some steps on how to troubleshoot some common website issues on any Linux distribution.

On a Linux server with Ubuntu, Debian, CentOS, or AlmaLinux OS can be hosted a variety of websites written in different languages such as PHP, Java, Python, etc. The main purpose of this tutorial is to be explained the common website issues that are related to the server and not to the language in which the website is written. That is why we are going to focus, on the issues related to the RAM of the server, Disk Usage, permission issues, DDoS attacks, database issues, DNS issues and etc.

The issues will be explained in different paragraphs and the possible solutions will be proposed as well. Let’s get started!

Insufficient RAM

Even the customers are advised not to host too many applications on a server with a small amount of RAM. The users are not aware of and install new applications. The requirements of nowadays applications are changing every day, and they need more RAM to run properly. These are the main reasons for the issue with insufficient RAM, and also, there are some services on the server that are running in the background that we do not need them.

If there is no RAM available on the service, some of the web services will stop and the website will be inaccessible. Also, there is the possibility of an OOM killer killing the database services, which may corrupt the database, and you may lose the data.

The possible solution here is to upgrade the server to have more RAM, optimize the application needs according to the server resources, or stop the unnecessary applications that are running in the background.

Disk Usage

The next possible issue, if your website is not accessible, is the insufficient disk space on the server. There are applications that, in the background, store a huge amount of uploaded data by the users, which the size of the folders may take up to hundreds of GBs.

Also, if the website visitors are in huge numbers, the log files may increase and take up the disk space on the server. Insufficient disk space may irreversibly corrupt your database and lose all the stored data.

So, to solve the issue with the disk usage you need to take care of your website’s data and where is stored, create a log rotation which is responsible to compress the big files, and of course upgrade your server to have more disk space.

Permission Issues

The wrong permissions are one of the most common issues that users can face. Uploading the folders and files to the server via some FTP clients such as FileZilla, can cause these problems since in most cases, the users have root access to their server and upload the files with the root user. Also, bad permissions like 777 in most cases can cause the attackers to gain access to your server and change your permissions.

Wrong permissions will make your website to be inaccessible and the possible solutions are: Use the right permissions 644 for files, 755 for directories, and the owner should be the USER that owns the directory under which the website is created. DO NOT set 777 permissions to files and folders, and DO NOT set root as the owner of the files and folders.

DDoS Attacks

A distributed denial-of-service DDoS attack is a malicious cyber attempt to disrupt the normal traffic of a website. The DDoS attack may increase the load on your server, take up the RAM completely, and may brake the services, which will stop the website services, or even may shut down the VPS.

The result of the DDoS attack is an inaccessible website, slow performance, high load and exponentially increased traffic. The possible solution would be using Cloudflare since it stops malicious traffic before it reaches the origin of the web server. Other solutions are having server redundancy, setup continuous monitoring, using warning signs and etc.

Database Issues

Database issues related to the server level, are issues with configurations, accessibility, and connectivity. We will not talk about database issues related to the application like missing columns, tables or so. The database service must be up and running always in order for the website is accessible without missing data.

Sometimes insufficient RAM or Disk space may brake the database service. The wrong configuration of the MySQL, MariaDB, or PostgreSQL service may lead to slow performance of the website. By the wrong configuration, we are talking about wrong values for connections, RAM usage, disk usage and etc.

The possible solutions to this would be checking the requirements of the application, the available RAM on the server, the available Disk space, or using another server as a database server separate from the application server with better resources.

DNS Issues

Sometimes everything is working on the server, there is enough RAM, and disk space, the permissions are correct the server is powerful to handle the traffic, but the website is still not accessible. It is recommended sometimes to check the DNS settings about the domain of your websites.

Sometimes the domain name may be expired, or simply there are changes in the DNS zone file. The domain A record should be always pointed to the server’s IP address in order for the website can be accessible. After the DNS changes, the propagation may take up to 48 hours, and the website might be accessible in some parts of the world instead of everywhere. Be sure always to check the A record of the domain, domain expiration date, and propagation.

That’s it. These were the most common website issues on the Linux servers, we tried to explain and propose to you some possible solutions. Of course, you do not have to debug the issues on your own.

All you need to do is to sign up for one of our NVMe VPS plans and submit a support ticket. We are available 24/7 and we will make sure your website runs without any issues.

If you liked this about troubleshooting common website issues on the Linux server, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below.

Leave a Comment