With this guide you will learn how to detect and solve error 500, an internal failure of the web server. If you have a store with Prestashop, watch out for failure!
The 500 error is a problem that appears if there is an internal server failure . If you have a blog that has suffered this error, when a user looks for you, a screen will appear that will announce ” Error 500, internal server error ” unfortunately, if it is not corrected in time, this will affect your positioning, but users can to try again later if they follow you.
If you have an online store, you can already tremble and try to solve this problem as soon as possible or they will go to the competition because they cannot see anything or buy your products. In fact, it may not convey confidence or assurance that your ecommerce has a problem, right? Luckily, with this guide we will tell you how to fix it quickly and easily!
What is http error 500?
As we have explained before, although its name indicates that it is a server error, it is an error produced by an instruction that the server is not able to interpret, at the same time it can affect the robots (search engines) that reach a url Without the information that should be found, it produces a rebound effect that logically in addition to affecting our audience will affect our organic positioning.
Where does the 500 error come from?
As we said, error 500 is an internal server failure that appears when executing a request . It is neither more nor less than a message that warns that something is failing and not working as it should (on the web server). Let’s not confuse terms because the 404 error, which is also very common, is due to a landing page that is no longer available or does not exist.
The disadvantage of this failure is that it can have several causes, so it is a bit difficult to find a suitable solution the first time and much more to get rid of it forever … what is certain is that it can be due to the following factors:
Waiting time . Servers have timeouts that determine how long a script that imports, exports, translates, or uploads backups runs for. If this limit is exceeded, it is usually 30 seconds, then the dreaded error 500 will appear.
.htaccess . If you have misconfigured this file then this bug appears. In fact, the misuse of friendly URLs causes internal problems in the web server or if we have written the code wrong in htaccess logically it leads us to have 500.
Folder permission . The 777 permission has a large number of weak points so it can corrupt the contents of the files in our folders and thus turn the good internal functioning of the server into a failure.
Programming error . It is usually the most common, a wrongly programmed line or one that conflicts with another store process is usually the most normal, when installing a module in Prestashop it usually happens very often.
Types of 500 internal server error
The types of 500 errors are classified into several types , generally each of them indicates a specific problem that will give us a clue of where we will have to look or how to solve the problem, all errors have the 5xx format, that is, within 500 several may appear that we indicate below:
Error 500: Internal error
The most famous and classic of the http 500 errors, when the server encounters an error and does not know how to process that information, it returns the classic 500 error that is valid for practically any programming error.
Error 501: Not implemented
It is not a very common error but generally in this case it is usually an error due to a problem with the server, as a general rule it is because it cannot recognize certain methods that the store is using, it usually occurs on old servers or with versions of php or mysql outdated. It can also be due to a server crash. Sometimes it can also be because our browser is not updated and does not know how to process this situation.
Error 502: Bad gateway
This error is usually due to an incorrect DNS, IP configuration, or it may even be due to a specific overload of our provider or ISP. These are usually temporary errors, so we recommend you wait a few minutes and try again.
Error 503: Service unavailable
Normally it is caused by an overload of the server, many visits at once, many processes, that is, it is a temporary saturation of the server due to an overload that has absorbed all the resources of the hosting, we can wait for the situation to normalize or restart the services to see if this can be solved, for example in a store in specific campaigns such as black friday or during a television campaign where there are many traffic peaks. In these cases, it is usually because we need a dedicated hosting for Prestashop or at least a machine that has more resources to process that information.
Error 504: Gateway timeout
Another of the classics that we find in many Prestashop stores, very common when there are connectors or massive product updates, the client wants to update 10,000 products at once and the server takes a long time, this generates an error that causes the process to be is running to cut because it takes a long time The solution to this problem is usually to try to optimize as much as possible, to carry out shorter processes or to propose an alternative solution if possible.
Error 505: Version not supported
Normally it occurs on very old servers, it would be convenient to update it as soon as possible, it is an error that indicates that the protocol used by the browser is not compatible with the server, if this happens you should update as soon as possible, your store is losing money.
Error 506: Variant Also Negotiates
It is a server error, something is wrong with the machine, the best thing is that you contact your support department and tell them the problem, they can tell you how to solve it.
Error 507: Insufficient Storage
Like the error 504 can be produced by a process that consumes a lot of RAM, also because we have run out of space on the server and we have to hire more space, in both cases the solution is to hire a more powerful hosting and / or review the process that consumes all the RAM.
Error 509: Bandwidth limit exceded
You have consumed all the bandwidth that you had assigned to your hosting account, or you speak with your provider to extend the monthly quota that you have assigned or you will have to wait for the term to start again.
Error 510: Not extended
Usually it is a server problem, it is old, it has an internal failure, it has a virus, or it may even be that the server administrator has denied access, contact your provider.
How can we fix error 500 in Prestashop?
We must first have activated error reports of Prestashop when we surf the front-office and back-office, in our case our Prestashop store so check and locate the error safely, also known in Prestashop as debug mode or display mistakes.
If you have the most recent versions of Prestashop ranging from 1.5.3 to 1.7 you have to perform these steps:
- Go to config / defines.inc.php
- Find the line of code
- Replace it with
If instead you continue with previous versions of Prestashop, peace of mind, follow these steps:
- Go to config / config.inc.php
- Find the line of code
- Replace it with
By activating the errors, we can exactly locate the root of the problem and know why it occurred and take the reins to solve it, it will show us the lines of code where the problem is found in the case that it is due to some code. Go for the 500 error!
The best thing is to prevent, for this, the best thing is to regularly review the error log that our server has, there is a file generally in txt format that indicates all those errors, with which we anticipate possible problems with the client If your server has CPANEL, for example, you have a log only for these errors.
As you can see, we can independently see the most common errors of a Prestashop store, 500 or 400 errors, if your panel is plesk or another, it is similar, all servers have help.
Solution to http 500 bug
Your error may not come from the aforementioned causes, no problem since you now have more information with which to address the problem. After having made the pertinent diagnosis, we propose the following solutions based on the cause that caused it:
The error is due to the waiting time . We will have to increase that time for the scripts to run smoothly. If you have a service provider, you should contact him, change the parameter and voilà ! Or optimize the source code so as not to overload the server.
The fault arises from htaccess . First of all, make a backup copy of the .htaccess file, then deactivate the friendly URLs or even regenerate the httacces, by default if you deactivate the friendly urls in Prestashop it will be regenerated automatically.
The code 500 is in the permission of the folders . Change the permission from 777 to 755 or 644. Sometimes we may have changed the permissions of a folder and that is why it has given us an error, Prestashop is very picky about the issue of security permissions.
Sometimes if the error is a programming error within Prestashop, we recommend that you hire a Prestashop expert to help you solve it as soon as possible, you will avoid headaches, and above all time in looking for a solution that a professional It can solve you in a moment, or at least tell you what to do.