Errors 500, 502, 503, 504 and 508. Reasons and ways of fixing
- Category : Tips and Tricks
- Posted on : Apr 19, 2020
- Views : 1,030
- By : HostSEO
500 error: Internal Server Error
503 error: Service Unavailable
504 error: Server is unavailable
508 error: Resource Limit Is Reached
500 error: Internal Server Error
What does it mean?
The Web server encountered an unexpected condition that prevented it from fulfilling the request by the client for access to the requested URL.
Why does it appear?
1. .htaccess file
The most widespread reason of such kind of an error is the incorrect syntax of the .htaccess file or existence of incorrect directives in it.
.htaccess file can be found in cPanel > File Manager menu with the help of this guide.
We recommend starting re-naming the .htaccess file temporarily to understand whether the issue is related to it or not. You can use FTP or cPanel File Manager > Rename option. If this helped and youâ$™ve found out .htaccess is the culprit, start commenting out lines in .htaccess by adding # to the beginning of each line one by one.
NOTE: It is strongly recommended to avoid making changes to the content of the file if you are not familiar with its syntax. Also, we recommend having a backup copy of the file at all times.
In case the error does not disappear after the .htaccess file modification, you need to check the error_log file and the latest PHP error records in it.
Do not forget to rename the file and uncomment the lines back.
2. Incorrect permissions of a file or directory
That can be another reason for 500 error. Permissions can be corrected in cPanel > File Manager > Change Permissions. Refer to this guide for more detailed instruction.
Mind the correct permissions:
files - 0644
folders - 0755
public_html - 0750
3. Reaching LVE limits
It is possible the error is caused by the fact that your hosting account is exceeding virtual resource limit. There are several ways of checking it:
Resources Usage page in cPanel.
Through SSH tunnel. The Linux top -c command will show real-time information and statistics about your running processes.
Solution: If your account is reaching its LVE limits, we recommend checking the error_log file and the latest error messages to find which script, plugin, etc. causes the issue. Once you know the cause, you should optimize your site/account performance to ensure it does not hit your account resource limits anymore.
4. ModSecurity
In rare cases, this error may appear due to the triggered mod_security rule. You can manage ModSecurity with the help of this guide.
If the steps above did not help, submit a ticket to the Hosting department and our technical specialists will assist you.
What does it mean?
The server received an invalid response from another server it was accessing while attempting to load the web page or fulfill another request by the browser.
Why does it appear?
It appears when the web server is not able to process the request. Such error can be connected with the incorrect functionality of a proxy server, DNS server or hosting server itself. Below you can find the most common reasons for the error:
1. The increasing load on a server. It may be caused by resource intensive activity of some cPanel users, internal server technical failure or lack of server resources to process all incoming requests.
2. Our technical team catches such errors during the regular monitoring, and it generally takes from 10 to 30 minutes to fix it and restore normal functionality.
So if you receive 502 error while trying to access your site, try to access it in 10 minutes again and if the error is still there, contact our Live Support team.
This error indicates that the server is unable to process the request properly.
Why does it appear?
The Webserver is currently unable to handle the HTTP request due to a temporary overloading or maintenance of the server.
Also among reasons can be:
 - inodes/disk overusage;
 - irrelevant php.ini/htaccess directives;
 - incorrect PHP version used;
 - lack of memory etc.
Solution:
1. Switch PHP versions;
2. Check disk space and inodes usage, etc.;
3. Check error logs and the latest error messages to find which script, plugin, etc. causes the issue;
4. Check our status blog or contact our support team to ensure the server is up and running.
If the solutions above have not helped, contact our Live Support for the detailed investigation.
504 error: Server is unavailable
What does it mean?
The server received an invalid response from another server it was accessing while attempting to load the web page or fulfill another request by the browser.
Why does it appear?
The reasons for this error are almost the same as for 502 error. The difference is that unlike 502 error where the invalid response was received from the server, the response was not received at all within a specific time frame. Thus, the request timed out stating that the server is unavailable. That means that during the highest load peaks, Apache is not able to process the number of requests and put them into a queue.
Since the error is in 90% of cases connected with the server load, and all services are monitored, our Technical Team is notified about the issue right away and is able to resolve it within 10-30 minutes. Once more, the possible reason is the script in your account that requires more time to execute than it is configured on the server by default.
Solution: Check our status blog or contact our support team to ensure the server is up and running. If the serverâ$™s performance is normal, most probably one of your scripts requires more time to execute. The solution for this case is to increase the PHP time limit for script execution. It can be done in the php.ini file by increasing max_execution_time value. Note that the LSPHP directive in .htaccess should already contain the correct php.ini path. The optimization of a script performance is the second way of fixing the issue.
508 error: Resource Limit Is Reached
What does it mean?
It means that your website is hitting Entry Processes.
Why does it appear?
Each LVE limits the number of entry processes (web server processes entering into LVE) to prevent single site exhausting all web server processes. If the limit is reached, then mod_hostinglimits will not be able to place web server process into LVE and will return error code 508. You can check the resource usage of your account by logging into cPanel > Resources Usage menu or in real time using the SSH command top -c. If the error appears too often, optimization of scripts or an account upgrade to the plan with higher server resource limits will be required.
Solution:
Categories
- cPanel Question 47
- cPanel Software Management 29
- cPanel Tutorials 13
- Development 29
- Domain 13
- General 19
- Linux Helpline (Easy Guide) 156
- Marketing 47
- MySQL Question 13
- News 2
- PHP Configuration 14
- SEO 4
- SEO 42
- Server Administration 84
- SSL Installation 54
- Tips and Tricks 24
- VPS 3
- Web Hosting 44
- Website Security 22
- WHM questions 13
- WordPress 148
Subscribe Now
10,000 successful online businessmen like to have our content directly delivered to their inbox. Subscribe to our newsletter!Archive Calendar
Sat | Sun | Mon | Tue | Wed | Thu | Fri |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 |
Recent Articles
-
Posted on : Sep 17
-
Posted on : Sep 10
-
Posted on : Aug 04
-
Posted on : Apr 01
Tags
- ts
- myisam
- vpn
- sql
- process
- kill
- tweak
- server load
- attack
- ddos mitigation
- Knowledge
- layer 7
- ddos
- webmail
- DMARC
- Development
- nginx
- seo vpn
- Hosting Security
- wireguard
- innodb
- exim
- smtp relay
- smtp
- VPS Hosting
- cpulimit
- Plesk
- Comparison
- cpu
- encryption
- WHM
- xampp
- sysstat
- optimize
- cheap vpn
- php-fpm
- mariadb
- apache
- Small Business
- Error
- Networking
- VPS
- SSD Hosting
- Link Building
- centos
- DNS
- optimization
- ubuntu