We have written this article for customers who are having a concern that, Why Virtual Memory (RAM) usage is more when I don't run any application or I have not even started my website or I get only less traffic now, but RAM usage is more.


First of all, You need to understand the various technical things involved in memory, for example when it comes to memory in larger terms,  RAM, Virtual memory, Paging, Cache memory and so many other things are involved. 


If you are not willing to learn all these technical things, In simple terms the OS (operating system) will use the RAM(memory) as lavishly as possible like any rich kid and when RAM is less and not sufficient to run all the applications, It uses all the technique mentioned above to manage the show within the given RAM size. If not enough, it will kill the process, it's called (OOM) out of memory. If OOM occurs often then you must update/increase your RAM.


When any server is installed with any control panel, when not in use, these could be the usage scenario. 



Used Memory is 122M, which is needed for your OS and other essential softwares. 

The most important thing to note is the load average. When the load average goes beyond 2.x or 3.x, that's when you need to upgrade or increase your RAM and CPU.


Apart from the explanation given above, There could be 100 reasons why more RAM usage. Please read some of the following.


  1. System might be running some software updates 
  2. System might be doing some routine task (crontab, scheduled task)


If you are interested to know more about RAM, Virtual Memory, refer the following links.


  1. https://searchstorage.techtarget.com/definition/virtual-memory
  2. https://www.tutorialspoint.com/operating_system/os_virtual_memory.htm


                                                       Filezilla not connecting, Connecting Error

What is Filezilla?

FileZilla is one of the most popular and free open-source applications which is used in transferring files from local PC and remote servers. FileZilla traditionally supports the File Transfer Protocol over the Transport Layer Security. This software of FileZilla is available on different platforms and it's absolutely free.

FTPS is less firewall-friendly when compared to SFTP as it requires opening a number of ports in the operation. 


Steps to Fix the “Unable to connect” issue

1) Error “Server sent passive reply with unroutable address. Using server address instead.”



This type of issue comes occasionally because the server is unable to connect in passive mode

2) Switch to Active mode in File Zilla and you are in.

Goto File Zilla >> Edit >> Settings >> Connection >> FTP >> Passive mode >> “Fall back to active”



Alternative Method 

FileZilla => Edit => Settings => FTP=> Transfer Mode (Click on "Active" and then Tick "Allow fall back to ......"



 Re-connect your FTP user !!!

By following these steps you can fix the issue when the Filezilla is not connecting.


The website is loading slow 

 

Loading time of your website is very important and we have written about it in great details in this URL https://www.hostingraja.in/solutions/loading-time-optimisation-service/, please check it.

In HostingRaja we recommend possible solutions to improve the loading time of our client's website.

Clients can migrate to VPS or Cloud or Dedicated server of HostingRaja as we use the optimized control panel to improve the loading time of our client's website or you can also contact our technical team they will help you in bringing down the loading time. If in case you are using VPS or Cloud or Dedicated solution from HostingRaja then we suggest upgrading the RAM, CPU, and bandwidth. Even after using higher configuration if your website is loading slow then you need to contact your web developer for further assistance.


Below are the possible reasons for a slow loading website:

 

Too Many Images in top banner and too many images on any page

 

Over-enthusiastic business owners or web developers keep too many images on the home page to impress the visitors. If you are having too many images on your website ensure that the images are very well optimized and it is less than 200kb. If you are using any top banner then be sure that you have only 3 or 4 images on the top banner having more than 3 images on the top banner will increase or loading time. We have seen in some scenarios where customers have more than 10 images in the top sliding banner.

If you are having too many images on your website try to reduce the number of images loaded or reduce the size of the icons and images. If you are using too many small images ensure that each image is less than 25 KB in size.

Another common reason for slow loading of the website is that too many CSS and JS files

The reason why some websites are having too many CSS and JS files is that these websites are created using any open source or any template or themes available from the Internet.  These themes and templates generally have more than 4 or 5 CSS in the home page, when you have more than 4 or 5 CSS or JS in your website or any particular page, you are loading time will certainly increase. In shared hosting, you find out how many CSS / JS files are in your website, if you have more than 5 CSS or JS files put together then obviously your loading time will increase contact your web developer and ask them to reduce the number of CSS JS within 5 to 6.

Too many plugins and add-on (Common Problem in WordPress and Joomla)

This problem is very common in WordPress and Joomla open source CMS. Website administrator browses through Add-ons and Plugins directories of any open source CMS when they see lots of plugins and Add-ons available for free they simply keep adding plugins to the website. When you had too many plugins to your website the loading will certainly increase.

When your website is loaded or any page is loaded each and every plugin installed on your WordPress or Joomla website will be invoked by the Apache. To put it in simple words for every plugin you have installed, the loading time of your website will increase by 2 seconds. So try to avoid installing unnecessary many plugins on your website.

Absence of a CDN:

A CDN or content circulation network is an appropriated organization of free workers situated in various geographic areas. They are utilized to serve web content to site guests with expanded accessibility, permeability, and execution. The second mark of this article clarifies why worker area matters for page load speed. A CDN distributes neighborhood workers to a site. This implies that it gives the site a US worker for its US guests and a Danish worker for Danish guests. This limits the full circle time (RTT) of the web content and loads website pages a lot quicker.

 

Reduce the number of images used on your website

For some unknown reasons, customers or website owners or website administrator are obsessed to have too many images in the website, certainly having too many images in your website will not increase the revenue or the profit for your website. If having too many images will help to increase the review of any website then everybody will have hundreds of images. So it is a wrong notion to assume that having too many images will help your website.

Database problem

Problem-related to a database which might lead to slow loading of websites for example if the developer doesn't use optimized MySQL query then it will increase the loading time of your website. So you can study on Google about how to optimize MySQL query that will give you enough information. For example, in my SQL server, there is a slow query option is there when you enable slow query option you can know what are the queries are taking more time to execute, find out those slow queries and then optimize it so that your website can go faster.

Whenever you are using select query you have to use select query always with the limit count for example If you want to select a record of matching certain name then you have to write a select query like select only the necessary field from the table where the name is equal to this name and limit is 1 when you use limit in your SQL Query execution will be faster.

Too many Apache connections

Every apache server running in any server will always have a limitation on the number of connections it can accept, for example at any given point of time Apache will serve 250 or 500 or 1024 connections at a given point of time. So if your website is under DDOS attack or denial of service attack or slows attack then all the HTTP connections of your Web server will be utilised by the attacking parties so your website server will not have the option to serve your customer this will give you impression that your website is loading slow you can find out whether your website is under attack or not by using netstat command available in Linux

Bandwidth limitation applied by hosting provider

 

Just check with your website provider or hosting provider whether any bandwidth limitation is applied for your hosting or not. If they have applied any limitation on your bandwidth talk to them and upgrade your hosting plan as necessary.

Compressing JS and CSS files

 

Nowadays due to the complex requirement of websites, web developers use very lengthy CSS and JS documents. About 5 to 10 years before the CSS and JS files used to be less than 1 kb in size and nowadays complex JavaScript frameworks such as JQuery, Node JS, and Angular JS, these JavaScript frameworks are huge in size. If the JS file size is more than 2 KB then loading of this JS and CSS files will take more time by the browser, generally, CSS and JS files are added in the header section of the Unique HTML. A browser will try to load all the files mentioned in the header section and this adds a delay in rendering the browser content.

Use plugins available for Cache purpose

 

Use plugins available for Cache purpose most of the modern content management systems like Wordpress and Joomla comes with a bundle of cache plugin make use of them to give better performance

Go with Virtual Machine from HostingRaja or Cloud HostingRaja from HostingRaja

 

Go with powerful servers such as HostingRaja cloud or HostingRaja VPS, if you are in shared server then there are certain limitations are applied such as RAM and CPU usage by upgrading to VPS and cloud VM you will have access to more resources to load your outside faster.

Poor coding practice

 

Myself being a programmer for the last 15 years I have seen most of the website Optimisation problem is due to poor coding practice.

Remove the dead source code

 

Remove the dead source code which is not required in your website it can help you to speed up your website

Use, less content in the header section of the HTML page

 

Use, less content on your website mainly within the header section of the HTML page, having more content in header section will lead to slow loading of your website

Avoid too many external backlinks

 

Avoid too many backlinks to an external website, having too many external links to a website like Facebook, Twitter or external feeds or RSS in your website will slow down your website loading time

Avg.Load of your server

 

If the average loading time of your website is higher than 5 to 10,  you'll have slow loading websites. In Linux using the top command, you can find out what is the average load of your website. If the average load of your website is more than 20 or 10 then you have to either upgrade the resources required for your website or have a Load Balancer or have multiple instances to serve your request.

How to test the loading time of the website?

There is a very popular misunderstanding of checking the loading time of the website. Many use Pingdom tools or other online tools to test the loading time of the website. These tools are very good tools to check the loading time of the website, but the ONLY problem with this kind of tools are, they are located in other countries such as USA, Canada or Europe.
When you test your website which is hosted in Indian Datacenter with this tools, you will find more loading time due to network latency (time taken for your data to transfer between Indian DC to this tools).
So, you should select the tools which are located in the same geographical regions to testing purpose. Suppose if your website is located in the Indian datacenter, then you have to use the website/tools which is from India. (this way, you will get more accurate speed and results)
The most accurate way to test your website is using the page load time plugin,
https://chrome.google.com/webstore/detai...dbig?hl=en
Important: When you test using these tools, you should have enough bandwidth to measure your site loading speed. Assume, If you have 1 Mbps speed in your computer, then the server can send data to you only maximum 1 Mbps speed. So, you should have at least 3 to 5 Mbps speed to test it correctly.
Buy Dedicated servers with best offers
 
Related links want to reduce the WordPress website load time:

Refer the below links for improving the loading speed for common CMS,

https://help.hostingraja.in/how-tos/how-to-improve-the-website-speed-by-70-in-one-hour
What is the Issue?
When selecting particular menu from the menu bar on the website or saving any data in forms is showing permission error.This means that you are not allowed to open the particular file or folder on HostingRaja VPS or Cloud server.This may be due to missing files and folders or other security restrictions in the Secured Server. A server is called as secured server when it is capable of isolating the spammers, harmful executable files on the server.when you have a secured server you can be assured about the error free data transmission.

Why has this issue occurred?
This problem or issues may be due to any one of the following problem with HostingRaja VPS or cloud:

The folders and files where you have placed your source code i.e public_html, is not given with proper permissions.
Ensure that each directory to which apache has access can be configured with respect to which services and features are allowed and /or disabled in that directory and its subdirectories.

Mod_security is an apache module that helps to protect your website from various attacks. It is used to block commonly known exploits by use of regular expressions and rule set. If the file/folder which is trying to break the mod security rule set will not be allowed to move further. The mod security works for apache and it blocks some of the functions which is captured by it as it is harmful. some times it simply turns off the apache when some parameters which are not defiend and are acting within its limits. How can we prevent it?
Follow any one of the following steps to prevent from the problem which is mentioned above:

1. Make sure that the files and folder which is present under public_html where your source code is present is having 755 permission instead of 750 and sensitive file should have 700 permission.Using 750 equates to users having read, write, and execute, groups having read and execute, and finally, world i.e your visitors having absolutely zero access, thus they will be forbidden from accessing and/or viewing the contents.
Use the following command to change file/folder permissions:
chmod -R 755 foldername/

Note: Directories should have the execution permission.
File should have read permission.
Do not add execute permission for files.

2. When it comes to the apache configuration, you need to check the below possibilities:
a) When you access a directory and there is no default file found in the directory    
Apache options indexes is not abled for the particular directory For example,
DirectoryIndex index.html default.php welcome.php

Make sure that You should not allow directory listing unless REALLY needed. Restrict the default index Directory Index to the minimum.

b) By default, your global directory settings under
/etc/sentora/configs/apache/domains/domainname.conf looks like :
                
<Directory "/var/sentora/hostdata/demo/public_html/">
Options +FollowSymLinks -Indexes +ExecCGI
AllowOverride All
Require all granted
</Directory>

If these lines are missing you need to add it to this file and restart the apache Service using the command:
               
service httpd restart
 
Now clear your browser cookies and cache and check whether it is possible to
Access the folder /file.You can also check the error logs and access log of
Particular domain name under HostingRaja Log viewer module.

Regarding this you can contact our support team for further details if you have any clarifications before doing any changes.

3. Mod security is a software that we configure alongside web servers to secure them on all HostingRaja VPS and cloud servers. Mod-security has certain rules to filter all incoming requests to the websites in your server.

These rules protect the websites in your server from hack attempts or code injections, which can cause malicious scripts to enter your server and mess it up entirely.

Any request to the web server are filtered by these mod-security rules and if matched against any rule, the user would be denied access to the page and Forbidden error would be displayed. The mod security set certain hirarchy for itself as a filtering action and when one of the web server doesn't obey its limitations it simply blocks to avoid more losses.

One of the default rules that Apache’s mod_security looks for is GET or POST in form submissions. This rule can lead to many contact forms giving 403 server errors in sites.

Example,
Special Characters present in the arguments passed on the browser url.
Passing sql injection attack ex: abcd.com/new.php?id=%27

To Resolve this mod security issue you need to contact our support team they will guide you regarding this issue and resolve the problem.

SERVER LOAD IS HIGH

HOW TO FIND OUT THE SERVER LOAD IS HIGH IN YOUR VPS SERVER OR DEDICATED SERVER?


  • Website is loading slow

  • login to SSH of your linux server, press ‘w’ to know the current average load and top -cd2 to know which process is taking the load.


WHAT IS SERVER LOAD?


Load that expresses how many number of jobs or active processes are waiting in the queue to access the computer processor. This is calculated for a certain period of time over the last 1, 5, and 15 minutes.

This server load  is indication on how much work has been done on your serve.

We consider a load value under 5 to be acceptable.However if the server average load reach  5.00 or greater for a consistent period of time, then it's worth finding out the exact cause of the higher server load to resolve the issue or prevent from server down.

                   

HOW SERVER LOAD IS LINKED TO THE PERFORMANCE OF YOUR VPS 

            

  • Not reducing large image file sizes

  • Not using Gzip compression

  • Not using Browser Caching

  • Using larger numbers of plugins.

  • Users/spammers sending spam email.

  • Users sending large mailing lists.

  • Server backup file are consuming server space.

  • Running out of memory and swapping to the swap file.

  • Error take place due to software misconfiguration.

  • To many high resource website running in single server - This cumulative resources resulting in high server load.

 

HOW TO SOLVE THE PROBLEM


  • Optimize images

  • Enable Gzip compression

  • Minimize the number of plugins

  • Enable browser caching

  • Choose a reliable web hosting plan

  • Remove the unwanted files and plugins.

  • Download the backup files to local system

  • Provide highly secure passwords for mail account to avoid the spammers attack.

  • Use the load balance server for high resource website..

  • Check the database tables are closed properly or not.


SYMPTOMS FOR THE LOAD RELATED ISSUE


Files, databases will not be able to upload  or download from the server .


Site will not load or very slow website loading.


Continuously server down will take place due to out of memory .When you restart the server it will work temporary after sometime again server will go down.


STEPS TO CHECK THE SERVER LOAD ISSUE IN SSH:


STEP 1: To check the server load.

  • Command: w

  • Average load for the server is : 5

  • If Average load is with in 6 check with mentioned below gtmetrix site speed checking tool.

        https://gtmetrix.com/

             

  • KEEP-ALIVE should be enable for apache server.

  • To enable KEEP-ALIVE => login to WHM => Search Apache Setting module => Enable    KEEP-ALIVE After 5 minute check with gtmetrix KEEP-ALIVE is enabled or not.

  • Inform the client check browser caching And Optimize images ,Minify JavaScript,CSS,HTML.


        But this is very basic case you should check the mentioned below cases also.


OUT OF MEMORY:


STEP 2: To check the disk space

             

Command :free -h


This is command to check what space is allocated and how much client have used, and free space.


STEP 3: Refer the message log file.


Command: vim /var/log/messages

  

Search ? Out of memory

                

               Check the date and time , if issue is related to out of memory inform the client to upgrade the plan.(If client is maintaining any backup files in server inform the client to download the backup to local system and delete from server)


MYSQL QUERY :


STEP 2:  Check which process taking high load.

             

Command : top -cd2

            

          Analyse for few minutes which process is taking high load, Most of the time mysql will take high load.


STEP 3: To check which mysql database taking more load.


Command : mysqladmin proc


STEP 4:

           

Case 1: If sentora_postfix database taking high , Check the mailq in SHH

             Command : mailq

If continuously mails sending in mailq it may be due to client sending lot of emails or spam mails or someone might have hacked the client mails.


Case 2: If  client database is taking high load.


It will happen due improper table close in client database(Inform the client to check table connection is closed or not) or due to lot hits in databases.

         

Example: e commerce site will take lot of mysql lot , Because it will have lot of plugins and products. (Inform the client to move load balance server.


Check 3306 port enable in csf or not , If client not using external database connection remove this port from csf


Command: lsof -i:3306 => to check port is enabled in server or not.


SERVER SLOW DUE TO HITS:


STEP 2: Use the mentioned below command to know server hits.


Command: tail -f /etc/httpd/logs/access_log


Command: tail -f /etc/httpd/logs/ssl_access_log


STEP 3: To check the mentioned below file to know Which countries are trying to access the server.

                   vim /etc/csf/csf.deny


STEP 4: If you found a lot of hits from other countries apart from his own country, Inform about the hits to clients and ask him what are the countries he has given the access  for his website.

                      Example: If client doesn't  wants to access his site from China and United States , just give the country code in CC_DENY in csf.


Refer this link to Deny counrty code in CSF:  https://www.liquidweb.com/kb/how-to-block-traffic-by-country-in-the-csf-firewall/

To know the country code : https://serverhealers.com/blog/csf-country-code-full-list/

                    

      

              BEFORE EDITING ANYTHING YOU SHOULD INFORM THE SENIOR