Scale up your application on your own by using our product to load test and fix bottlenecks. Sign up today and boost your application's performance.
...RECENT BLOG

2020 / 2 / 27

2020 / 2 / 27

2020 / 2 / 27

2020 / 2 / 27

2020 / 2 / 27
Introduction
The dreaded 500 internal server error. It almost always comes at the most inopportune time and suddenly you're left scrambling to figure out what has happened and why it happened and how to overcome it. Today we're going to dive into the 500 internal error and walk you through some ways to get your site back online quickly.
What is 500 Internal Server Error?
The 500 internal server error is a general catch all error when the server throws an exception which means this error will be displayed when no more specific error message is suitable. Due to its versatile nature, it is difficult to troubleshoot this error. As you will be not sure to find the exact cause of the error occurrence.
Here, 500 internal server error indicates that the server encountered an unexpected condition that prevented it from fulfilling the request.
500 Internal Server Error Variations
Different browsers, servers or applications use their own customised version of 500 error message. Here are several common ways that you might see the HTTP 500 error:
Sometimes, you might see a message accompanying 500 internal server error.
Sometimes, you might simply get a blankscreen.
500 Internal Server Error in Youtube appears like this
What are the Causes and How to Fix 500 Internal Server Error?
Where you should start troubleshooting 500 Internal Server Error, when you first encounter it? Sometimes, you really don't have an idea on how to react, from where to begin. Typically 500 errors are server related but from our experience we can say 500 error can be due to issues on client side or server related issues.
Sometimes, It is possible that there's something wrong on your end, in which case we'll look at some things you can try:
Fixes for 500 Internal Server Error for different Platforms
Checkout the common causes and ways to fix 500 internal server errors on various platforms.
Wordpress
500 Internal Server Error in Wordpress can occur due to many reasons. If you are experiencing one, there is a high chance that you will find the Cause and corresponding Fix in the table below.
S no. | Causes | Fixes |
---|---|---|
1 | Due to Bad Plugins | Deactivate or remove the plugin |
2 | Due to Themes installation | Change the existing theme to new one or change it to one of the default options |
3 | Due to corrupted .htaccess file | Create a new one or check your. htaccess file & make sure it is not corrupted |
4 | Insufficient PHP Limit | Increase PHP Limit by making changes in: a) CPanel b) Apache- edit .htaccess file manually c) php.ini File d) wp-config.php |
5 | Incompatible PHP Version | Try upgrading or downgrading the PHP version |
6 | Permission Error | Try changing the permissions for files and folders |
For further detailed information, refer How to Fix 500 error in Wordpress.
CGI Script
Apache CGI mode is very useful in terms of less memory usage but CGI mode is pretty sensitive to things such as permissions or file encoding which leads to 500 Internal Server Error. We have discussed Causes and Fixes for the 500 error in CGI script.
S no. | Causes | Fixes |
---|---|---|
1 | Directory Permissions | Try changing the cgi-bin directory permission to 0755 not 0777 |
2 | File Permissions | Your CGI Script itself should be 0755 not 0777 |
3 | Transfer Modes | Manually set Transfer Mode to ASCII or Binary, while using FTP instead of AUTO Transfer Mode |
4 | Line Endings | Try opening & Saving CGI Script in different text editor & uploading to server again |
5 | Network Timeouts(of API Calls, Remote scripts etc.) | Disable application features that require the outbound connections |
6 | Old Program(compiler) paths | a)Use Path defined in the server environment b)Define the program paths in Apache Config |
7 | Old Config Files with wrong module paths | a) Remove hard-coded program paths. b) Try to always use environment variables to automatically acquire program locations. |
8 | Security restrictions(web application, firewalls, SELinux etc.) | a) Create custom firewall exclusion rules b)Change SELinux setting from "Enforcing" to "Permissive" |
9 | No Execution Restriction on the partition | Restore exec by -#mount -o remount exec /home |
10 | Apache & .htaccess misconfiguration | Enable .htaccess through an "Allow Override" directive in Apache Config |
11 | Wrong Permission on home directory | In addition to permission of the cgi-bin directory, don't forget to change the permission of home directory to 0755 |
12 | Chroot related errors that break file paths | Reconfigure the server or site to use the right path instead of soft links |
Inside the Script | ||
1 | Shebang Line | Find the correct Path of Pearl binary on server using "which pearl" & specify full path in first line of CGI Script |
2 | Error in pearl code | Either fix the code or disable the plugin/ addon |
3 | Missing modules | Go through the app specification requirement & install missing modules. |
Refer How to Fix 500 error in CGI Script for step by step guide on ways to fix 500 error.
PHP
By default, web servers like IIS return only generic error message. This results in masking of real error message. We tried to jot down a list of Causes for 500 Internal Server Error in PHP websites and how you can Fix those errors.
S no. | Causes | Fixes |
---|---|---|
1. | Permissions Error | Try changing the permission of PHP scripts to 0755 |
2 | Bad PHP Settings | Fix PHP scripts to change default error handling to "IgnoreAndReturn200" |
3 | PHP Module Errors | Reinstall the faulty module |
Refer How to Fix 500 error in PHP for step by step guide on ways to fix 500 error.
Apache
A PHP upgrade, Apache recompilation, ownership changes, anything can trigger a 500 Internal server error in your websites in Apache. Let's have a quick review of all the factors that can cause 500 error and also look at the ways to Fix them.
S no. | Causes | Fixes |
---|---|---|
1 | PHP upgrade or Apache recompilation that went wrong | Try checking the modules that are unsupported and that caused incompatibility issues. |
2 | Errors in format or content of PHP or CGI Scripts | A code error or unsupported format need to be corrected |
3 | Settings in .htaccess or other config files | Change the settings php_flag or php_value for server that run SuPHP |
4 | Server or file system restrictions | SELinux restrictions or timeout settings need to be changed |
5 | Errors related to the PHP config file | Look for unsupported or invalid setting in php.ini file |
6 | Incorrect permissions and ownership for the files | Folders should have 755 permission, non-scripts should have 644, PHP scripts should have 600 and CGI and shell scripts need 755 permission |
7 | A faulty web server or PHP module | Php.ini file can be corrupted, that needs to be corrected. |
Refer How to Fix 500 error in Apache for step by step guide on ways to fix 500 error.
Opencart
Opencart website users may encounter 500 Internal Server error while accessing the website due to variety of reasons like PHP memory limit, permissions and many more. We will see the major causes of the error and how to Fix it.
S no. | Causes | Fixes |
---|---|---|
1 | Wrong file or folder permission | Change directory permission to 755 and file permission to 644. |
2 | Low PHP memory limit | Increase the PHP memory limit |
3 | Misconfigured .htaccess | Locate and correct the misconfigured .htaccess file |
4 | PHP Timeout | Analyze the server resources and tweak these limits to optimal values |
5 | Missing PHP Modules | Enable or install the missing modules |
6 | Non-compatible Opencart extensions | Disable all extensions and enable them one by one to identify the culprit |
7 | Corrupted files or wrong encoding | Set proper encoding for the files and replace recently changed files |
8 | vQmod and oCmod permissions | Manually clear vQmod cache and oCmod cache to fix the issue |
9 | Security Restrictions | Identify security rule that is blocking and add exemption for that on site |
Refer How to Fix 500 error in OpenCart for step by step guide on ways to fix 500 error.
Moodle (Modular Object-Oriented Dynamic Learning Environment)
It is one of the most popular open-source learning platforms that use PHP as a programming language. While using Moodle, have you ever got the 500 Internal server error message? Today we will attempt to make you aware of the causes of the error and how you can deal with the error.
S no. | Causes | Fixes |
---|---|---|
1 | Wrong Rewrite Rules | Check .htaccess or httpd.conf files and correct the syntax error. |
2 | Incorrect PHP Settings | Set script folders to 755 permission.php.in file is used instead of .htaccess in Moodle |
Refer How to Fix 500 error in Moodle for step by step guide on ways to fix 500 error.
Zend
It is one of the popular PHP Frameworks for website development. Framework is a collection of PHP packages, where these packages can be used by developers to develop web applications. Usually, the main reason for websites to show internal error is due to bad settings in website files.
Few settings in Zend config files help in debugging. We will see the ways to debug error in Zend and how to fix those errors.
S no. | Causes | Fixes |
---|---|---|
1 | Bad settings in .htaccess file | check the rewrite rules and correct it. Add .env variable in .htaccess |
2 | disabled mod_rewrite module in Apache web server | Enable mod_rewrite module in httpd.conf file. |
Refer How to Fix 500 error in Zend for step by step guide on ways to fix 500 error.
Webhook
It is one of the easiest ways to setup HTTP custom callbacks, which can serve many purposes like fetching real-time data, passing it to an application etc. Errors in Webhook can be tricky. We are here to help you to identify one such tricky error 500 Internal server error.
You can find a complete list of Causes and Fixes of 500 error.
S no. | Causes | Fixes |
---|---|---|
1 | Use of insecure connection | Set correct permissions for server files and folders |
2 | Bad scripting | Check scripts for errors and correct and update the same if there is any error |
3 | Permission error | Use of HTTPS instead of HTTP |
Refer How to Fix 500 error in Webhook for step by step guide on ways to fix 500 error.
Magento installation
Generally web hosts provide a very simple one click Magento Installation procedure. Sometimes, it can also behave weirdly, throwing a 500 Internal server error. Today, let's discuss Causes for 500 Internal server error that you encounter during Magento Installation and How to Fix the issues.
S no. | Causes | Fixes |
---|---|---|
1 | Permission issues | Change permission of index.php tp 644 and folders to 755 |
2 | Missing modules | Install missing module or extension on server |
3 | Insufficient resources | Tweak parameters memory_limit, max_execution_time, max_input_time to their optimal values |
4 | Invalid.htaccess entries | Locate and correct the misconfiguration |
5 | Maintenance mode enabled | Remove maintenance.flag from Magento's root folder and restore permission for index.php |
Refer How to Fix 500 error in Magento Installation for step by step guide on ways to fix 500 error.
Prestashop
500 Internal Server Error is common while Prestashop installation. Checkout top Causes and Fixes for 500 error.
S no. | Causes | Fixes |
---|---|---|
1 | Low PHP Memory Limit | Prestashop requires 128MB of space and with some addons, some additional space is required. So a sensible memory allocation will be, 128MB. If you have VPS, then 512MB. |
2 | Wrong file & folder permissions | The right permissions for the files is 644 and for the folders is 755 |
3 | Corrupted files or wrong encoding | Download a fresh copy of prestashop and replace recently changed files |
4 | Coding error in recently installed/updated module or theme | Try deleting the addon folder from the backend |
5 | Missing PHP Modules | Try installing missing modules |
6 | Database connection limit | Change max\questions_ variable to 0(unlimited) in MySQL Configuration file |
7 | Stale cache, incorrect .htaccess and many others | Fix .htaccess file and check security settings |
Impact of 500 Internal Server Error on SEO
When Google gets 5xx error on a site, it can lower a page's ranking or drop it from the index, as such errors may cause a negative user experience. In fact, these errors have the most harmful impact on SEO.
They are the most difficult errors to fix. It's hard to find the exact problem they indicate and its simplest solution. Also, often you can't solve these problems by modifying the page code and you may need to apply to developers or server administrators for help.
Still, you should, and even must, fix them as search engines don't like 5xx errors at all. A search engine can't crawl and analyze your site if it gets 500 error and 503 error. This also means that 500 error codes can cause poor user experience and negatively impact on your site's ranking and indexing.
Of course, your ranking will not drop as soon as a 5xx error appears. There have to be multiple instances of 503 responses over a week or two before the page is removed from Google's index. And here you have time to fix them.
If your site is only down for say 10 minutes and it's being crawled consistently a lot of times the crawler will simply get the page delivered from cache or Google might not even have a chance to re-crawl it before it's back up. In this scenario, you're completely fine.
However, if the site is down for an extended period of time, say 6+ hours, then Google might see the 500 error as a site level issue that needs to be addressed. This could impact your rankings. If you're worried about repeat 500 errors you should figure out why they are happening to begin with.
Conclusion
Like we alluded to above, 500 Internal Server error is not an issue at your side, rather it is a server-side problem. This means the problem is not with your device or internet connection but with your web server. Still, you can try some fixes at your end also, maybe they will fix the error. But in most cases, you need to follow the platform-specific troubleshoot mechanisms and Fixes to get the error fixed.
2020 / 2 / 27
2020 / 2 / 27
2020 / 2 / 27
2020 / 2 / 27
2020 / 2 / 27
Start Your First FREE Load Test with FrugalTesting
JMeter - How to build a Realistic Test Plan?