Test error 500

Learn what an HTTP error 500 is, potential causes for the error, browser compatibility, and more. Plus, how to fix 500 internal server errors.

Troubleshooting an HTTP 500 internal server error is like solving a mystery.

artwork indicating HTTP 500 internal server error that needs to be fixed

You don’t know what exactly happened or why it happened — all you know is that something’s wrong and you need to fix it.

Free Guide: How to Run a Technical SEO Audit

To guide you through the hassle of troubleshooting the dreaded HTTP 500 internal server error, let’s go over what it exactly means and its most common causes and solutions.

An HTTP 500 internal server error is a general error message. It covers unexpected issues that don’t fit into existing error codes. HTTP 500 errors are difficult to troubleshoot because a range of issues on the server side can trigger them.

Here are some examples of what a 500 error page might look like in your browser:

screenshot of an http 500 internal server error message example

HTTP error 500 example: Dribble

Image Source

HTTP error 500 example: Google

Image Source

HTTP 500

HTTP 500 errors aren’t problems with your computer, browser, or internet connection. Instead, they’re a generic response that catches any unexplainable server error. You’ll see the HyperText Transfer Protocol (HTTP) 500 Internal Server Error when your server issue doesn’t fit another error code.

Other Common Error Codes

HTTP codes show you how your web browser and website communicate. These are some other common error codes you might see on your website:

HTTP 200

This is a standard status code for websites that are performing well.

HTTP 301

This is the code for permanent redirects. For example, say you have two site pages about widgets with duplicate information and one gets more traffic than the other. It makes sense to redirect the low-traffic page to the high-traffic page to improve SEO for your site.

HTTP 302

This code is for temporary redirects. This is for situations where you want to send users to an alternate page for a short amount of time.

HTTP 304

This code shows up when the website you’re requesting hasn’t seen an update since your last visit.

HTTP 403

This code comes from the server when you’re trying to access a restricted URL.

HTTP 404

A 404 code tells your users that your server can’t find that page they requested with their browser. 404 errors are common, and some sites use this to their advantage.

HTTP 405

This is an HTTP response status code error. It tells you that a web browser wants to access your web page and your server has rejected that specific HTTP method. This means that the browser can’t access the requested web page.

HTTP 410

This is a permanent code that tells site visitors that the page they’re looking for doesn’t exist.

HTTP 413

This code appears when a user tries to upload a file that exceeds the server’s file size limit.

HTTP 429

This error is a server response to stop sending requests because of overloaded resources. This code might show up if your site needs to make too many API calls to meet a request.

HTTP 503

This code tells users that the server is temporarily unable to load the page they’re looking for.

Check out this post for a comprehensive overview of error codes.

Potential Causes of a 500 Internal Server Error

A 500 internal server error is, as the name implies, a general problem with the website’s server. More than likely, this means there’s an issue or temporary glitch with the website’s programming.

Some potential causes of a 500 internal server error include:

Corrupted or Broken .Htaccess File

A .htaccess file is a text file with important server instructions. These instructions tell your software to enable or disable specific functions. They might help you protect passwords in a directory or restrict user access.

There are many ways to corrupt a .htaccess file. It can happen during plugin installation, file configuration, or while you are working on your server.

A Permissions Error

Permission errors come with file protection. Permissions errors might be bugs, user mistakes, or networking problems. Usually, this error means that the user isn’t allowed to perform the action they’re trying.

Faulty Third-Party Plugins or Themes

To increase user features and functionality, you might add a third-party theme or plugin to your website. These plugins can be great for your site, but they can also impact site security, bugs, and performance.

These plugins and themes are often created by individuals or small groups. This can be challenging because they may need more time to address bug fixes and vulnerabilities.

Exceeding the PHP Memory Limit

PHP is a server-side scripting language embedded in HTML. PHP is for managing content, databases, session tracking, and more. Each PHP process uses memory, and your hosting account has a limit for each one of these processes.

If a website needs more than this memory limit, you may see an HTTP 500 error.

HTTP Error 500 Browser Compatibility

Most businesses design their websites for maximum browser compatibility. This means that your website is easy to access and use on any browser or operating system. But your site may work perfectly in one browser and have issues or errors in others.

Because HTTP 500 is a catch-all error, you can see this error on any browser and in any operating system.

How an HTTP 500 Error Might Appear

This error can come up on any site you try to visit on a browser. Because it’s such a common error, there are many ways to communicate this code.

  • Internal server error
  • The page isn’t working
  • 500 Internal Server Error
  • 500 Server Error
  • 500. That’s an error.
  • HTTP 500.0 — Internal Server Error
  • Error 500
  • Error code: 500
  • The server returned a 500 Internal Server Error
  • Temporary Error (500)

How to Fix a 500 Internal Server Error

Unlike other server-side errors like a 502 code, a 500 internal server error is it doesn’t immediately tell you what the problem is, nor does it tell you how to fix it. If the error persists for too long on your site, it could even negatively impact your SEO.

So, let’s dive into some solutions so you can try to fix the issue.

If You’re Trying to Load a Page with a 500 Internal Server Error:

1. Refresh the page.

This might seem obvious, but if it’s a temporary loading issue, you might find success if you refresh the page. Before trying anything else in this list, reload the page and see what happens.

2. Come back later.

Since the error is on the server side, I’m willing to bet the website owners are working as quickly as possible to resolve the issue. Give it a few minutes or up to an hour or so, and then reload the URL and see if the development team has fixed the issue.

3. Delete your browser’s cookies.

If clearing the browser history doesn’t work, you might try deleting your browser’s cookies. If the cookies are associated with the error-prone webpage, deleting the cookies might help reload the page.

4. Paste your URL into the website «Down for Everyone or Just Me.»

Head to downforeveryoneorjustme.com and paste in the URL where you’re seeing the internal server error. You’ll either be told that the website is only down for you, or that the website is down for everyone.

the homepage of downforeveryoneorjustme.com displaying the http 500 internal error status of youtube.comIf it’s a problem with your server, this should help assuage any concerns that it’s an issue with your own computer.

If the 500 Internal Server Error is on Your Own Website:

1. Deactivate a plugin or theme.

Newly activated software, add-ons, or third-party scripts might be conflicting with your current server configuration. To determine this, try (carefully) deactivating or uninstalling your software add-ons one at a time to identify what exactly is causing the internal server error.

If you run a WordPress website, this is easy to do with plugins. From your dashboard, choose Plugins > Installed Plugins, then deactivate the first plugin. If the error resolves, you know this plugin is part of the issue. Reactivate the first plugin, then repeat this deactivate-reactivate process one at a time for all plugins to determine which ones are causing your error.

list of active plugins on a wordpress site and a deactivate button to resolve an http 500 internal server errorYou might find that having fewer active plugins on your site helps things run more smoothly.

Alternatively, if you just upgraded your software, your current plugins or themes might not be compatible with the new upgrade. Deactivating plugins or themes one at a time until the error disappears is the best way to find the root cause of your problem.

2. Use a plugin like WP Debugging to identify the issue.

If your site is powered by WordPress and you’re comfortable with WordPress debugging processes, consider installing a plugin to help you identify the issue with your server.

The debug plugin WP Debugging, for instance, helps you figure out exactly what’s wrong with your site, which will result in a speedier fix.

download page for the wp debugging plugin to help resolve the http 500 internal server error in wordpress

Image Source

3. Ensure your PHP setup is configured correctly.

If the issue is related to a PHP timeout, consider creating timeout rules or error handling in your script to resolve the issue. Here’s a full list of php.ini directives to configure your PHP setup.

Additionally, wrong permissions on a file or folder that has a script, like a PHP or CGI script, won’t allow the script to run. Check your permissions and make sure you set them correctly on your server.

4. Check the code for your site’s .htaccess file.

Incorrect coding or improper structure with your .htaccess file could be the reason you’re seeing the 500 internal error. The .htaccess file helps you manage how long resources should be stored in a browser’s cache. Try editing the file if you’re seeing a 500 internal server error.

To locate your .htaccess file, access your website files through a file manager like cPanel or via FTP/SFTP. The file will probably be located in your public_html directory. There’s a good chance your server will hide this file from view by default and you’ll need to toggle hidden files on to see it.

a server file directory highlighting the htaccess file to resolve the http 500 internal server error

Image Source

Coding errors in .htaccess and custom scripts can also cause an HTTP 500 internal server error.

5. Ensure your new software is installed correctly.

Finally, check to see if your recently installed or upgraded software actually failed to install or upgrade. To refresh your software, check the vendor’s website for instructions.

How to fix a 500 internal server error

Last Resort: Ask a Server Administrator for Help

If troubleshooting popular software problems or debugging server-side scripts doesn’t fix your HTTP 500 internal server error, you should read about the most common causes for this type of issue in your server’s documentation — an HTTP 500 internal server error can occur in different operating systems for a multitude of reasons.

You can also ask your service provider to access your error logs and find evidence of the root cause of your problem.

Internal server errors are irritating because they’re unhelpful — it’s basically the web server’s way of saying, «Eh, I’m not sure.» Hopefully, one of the above steps will resolve the problem so you can get back to life as usual.

Editor’s note: This post was originally published in October 2018 and has been updated for comprehensiveness.

seo audit

If your Internet Information Services (IIS) produces a 500 – Internal server error, your website is in serious trouble. Debugging an IIS 500 – Internal server error can take some time, so you’d better be prepared for the worst-case scenario. You don’t want to research how to deal with this error under time pressure.

Contents

  1. Cause of 500 – Internal server error
  2. Debugging an IIS 500 – Internal server error
  3. Resolving an IIS 500 – Internal server error
  4. Common 500.x substatus codes
  • Author
  • Recent Posts

Surender Kumar has more than twelve years of experience in server and network administration. His fields of interest are Windows Servers, Active Directory, PowerShell, web servers, networking, Linux, virtualization, and penetration testing. He loves writing for his blog.

Latest posts by Surender Kumar (see all)

  • Extending LVM space in Ubuntu — Thu, Feb 2 2023
  • Backup in Proxmox VE — Thu, Jan 26 2023
  • Snapshots in Proxmox VE — Wed, Jan 25 2023

In my previous posts, you learned about detailed errors and failed request tracing in IIS (Internet Information Server). I recommend reading those articles first before you proceed with this one.

Cause of 500 – Internal server error

This is the most common error you will encounter with any website hosted with IIS. In most cases, a developer messed up. Thus, the fastest way is often to simply reverse the last action taken, such as restoring an earlier version of your web application. Once your system is running again, you can investigate the cause of the error on your test side in peace.

500 Internal server error

500 Internal server error

The HTTP 500 error is a server-side error. While we understand that the problem is on the server end, the error is usually ambiguous. It doesn’t exactly tell the administrator what is wrong with the server. Thus, debugging a 500 – Internal server error often takes some time.

Debugging an IIS 500 – Internal server error

Since the above error doesn’t really tell what’s actually wrong with the server, we need to enable detailed errors, as discussed in my previous post. Once detailed errors are enabled, you will see more detailed error information, including an HTTP substatus code. Sometimes even the detailed errors don’t show any useful information right away. For example, see the following screenshot:

The page cannot be displayed because an internal server error has occurred

The page cannot be displayed because an internal server error has occurred

Here I am getting: The page cannot be displayed because an internal server error has occurred. There is no HTTP status code or substatus code listed on the error page. If you get such an error even when detailed errors are enabled, right-click anywhere in the browser window and select Inspect (or press F12).

Opening developer tools in web browser to reveal server errors

Opening developer tools in web browser to reveal server errors

This opens the developer tools in your browser window. Now, click the Console tab. The actual error thrown by the web server is displayed.

Viewing server errors using the Console tab of the web browser's developer tools

Viewing server errors using the Console tab of the web browser’s developer tools

To further understand the exact cause of 500 errors, enable Failed Request Tracing, as discussed in my previous post. Now, try to replicate the problem. If you can replicate it, open the newly generated XML log file in a web browser. The following screenshot shows the actual cause of a 500 – internal server error with a substatus code of 19 (HTTP 500.19 error):

Determining the cause of a 500 error using the Failed Request Tracing log file

Determining the cause of a 500 error using the Failed Request Tracing log file

Usually, substatus code 19 indicates that the configuration data is invalid. This could be due to some malformed or unidentified element in a server-level config file (ApplicationHost.config) or website-level config file (web.config). If you take a closer look at the ConfigExceptionInfo field of the log file, you will find the exact line number (6 in our case) in the web.config file that caused the exception. Now let’s take a look at the web.config file itself.

Viewing the problematic element in the web.config file

Viewing the problematic element in the web.config file

Here, you can see that the developer tried to add a mime type in the config file, but it was already defined in the server-level configuration file (i.e., ApplicationHost.config). Therefore, the Cannot add duplicate collection entry of type ‘mimeMap’ with unique key attribute ‘fileExtension’ set to ‘.mp4’ exception was returned. Furthermore, if there is some unidentified element, a syntax error, or even a typo in the web.config file, you will most likely get a similar error.

Resolving an IIS 500 – Internal server error

To resolve an IIS 500 – Internal server error, you could simply remove the line that is causing the exception. Alternatively, if you don’t want to remove this line for some reason, add the following code right above line 6 in web.config:

<remove fileExtension=".mp4" />

By doing this, you are essentially overriding the server-level element. In the end, your web.config file should look as shown below:

Overriding the server level mime element with web.config file

Overriding the server level mime element with web.config file

Now refresh the page, and the error should go away. This was just one example of resolving a 500.19 error. If you get a 500 error with a different substatus code, use the same approach to troubleshoot the problem.

Common 500.x substatus codes

The following table covers some of the most common HTTP 500 substatus codes, along with their probable causes and troubleshooting advice:

Subscribe to 4sysops newsletter!

Status Code Probable Cause Troubleshooting Advice
500.11 The application is shutting down on the web server The application pool is shutting down. You can wait for the worker process to finish the shutdown and then try again.
500.12 The application is busy restarting on the web server This is a temporary error and should go away automatically when you refresh the page. If the error persists, something is wrong with the web application itself.
500.13 The web server is too busy This error indicates that the number of incoming concurrent requests exceeded the number that your IIS application can process. This could be caused when the performance settings are not right. To troubleshoot such issues, a memory dump needs to be captured and analyzed using tools such as Debug Diagnostic.
500.15 Direct requests for Global.asax file are not allowed A direct request was made for the Global.asa or Global.asax file, which is not allowed by the web server
500.19 The configuration data is invalid We already covered how to fix this error above
500.21 The module not recognized This status code is caused by a partial installation of the IIS server, such as missing ISAPI modules. To fix this error, identify the missing IIS components and install them.

Once you troubleshoot the problem, don’t forget to disable Failed Request Tracing and revert the detailed errors to custom errors on your web server.

Содержание:

  • Что означает код ошибки 500 и почему она возникает?
  • Где можно встретить ошибку 500?
  • Все причины возникновения ошибки
  • Что делать при появлении ошибки? 

    • Подождать
    • Сообщить администратору
  • Что делать администратору при появлении ошибки? 

    • Проверить файл htaccess
    • Проверить лог ошибок
    • Проверить содержимое CGI-скриптов
    • Проверить плагины и компоненты
    • Увеличить объем оперативной памяти сервера

Что означает код ошибки 500 и почему она возникает?

Коды состояния HTTP сообщают браузеру интернет-пользователя (клиенту), успешно ли выполнен запрос (получение доступа к сайту). К примеру, если браузер получает код состояния 200, то все прошло успешно. Это сообщение не видно пользователю — вместо него появляется запрошенный контент.

С кодами состояния 400 и 500 дело обстоит иначе. Первый означает, что ошибка связана с клиентом, а второй — с сервером.

Internal Server Error 500 — общий код состояния для ошибок со стороны сервера. По этой причине невозможно сразу определить, где именно возникла проблема: известно лишь то, что сервер сообщил о ней. Когда это происходит, сайт отображает посетителям страницу с сообщением об ошибке.

Где можно встретить ошибку 500?

Поскольку эта ошибка является частью спецификации HTTP для сайтов, она может появляться в любом браузере и на любом компьютере, в том числе на мобильных устройствах.

Ошибка 500 может отображаться различными способами, но в большинстве случаев сообщение включает код состояния 500, фразу «внутренняя ошибка сервера» или и то, и другое. Вот несколько распространенных примеров:

  • 500 Internal Server Error;
  • HTTP 500 — Internal Server Error;
  • Temporary Error (500);
  • Internal Server Error;
  • HTTP 500 Internal Error;
  • 500 Error;
  • HTTP Error 500;
  • 500. That’s an error.

Обычно эта ошибка отображается в окне браузера, как стандартная веб-страница.

Все причины возникновения ошибки

Internal Server Error 500 возникает, когда запрос обрабатывается сервером. Этот код состояния включает все незапланированные события, которые могут произойти на стороне сервера и помешать загрузке сайта. Одна из возможных причин — ошибка в конфигурации сервера.

Вот несколько типичных источников проблем.

  • Доступ запрещен — разрешения основных файлов и папок заданы неправильно.
  • Тайм-аут сеанса PHP — скрипт пытается получить доступ к внешнему ресурсу и сталкивается с задержкой.
  • Некорректный код в htaccess — структура htaccess, файла для локальной настройки сервера Apache, может быть неправильной.
  • Ошибка в синтаксисе и коде скриптов CGI и Perl — в этих скриптах могут встречаться неточности, в частности несогласованность путей.
  • Лимит памяти PHP — процесс превышает пределы памяти и поэтому не может быть выполнен правильно.

Если сайт работает на WordPress или другой системе управления контентом, причиной ошибки может стать неисправное или несовместимое расширение. Плагины и темы — особенно от сторонних провайдеров — могут повлиять на весь сайт.

Если ошибка сохраняется в течение длительного времени, это может негативно повлиять на SEO сайта. К счастью, большинство из этих проблем можно исправить.

Что делать при появлении ошибки?

Если вы попытались открыть веб-страницу, но увидели Internal Server Error 500, можно сделать следующее.

Подождать

Поскольку ошибка исходит со стороны сервера, владельцы сайта, скорее всего, уже работают над ее устранением. Попробуйте подождать несколько минут или около часа, а затем перезагрузите страницу.

Также можно заглянуть на сайт downforeveryoneorjustme.com и вставить в поисковую строку URL-адрес страницы, на которой произошла внутренняя ошибка сервера.

Сервис сообщит, возникла ли проблема только у вас или же у всех пользователей.

Сообщить администратору

Еще один вариант — связаться с владельцами сайта. Если вы предполагаете, что они еще не знают об ошибке, лучше всего сообщить им — это поможет и вам, и другим пользователям.

У большинства сайтов и сервисов есть аккаунты в социальных сетях, а на некоторых даже указаны email-адреса и номера телефона.

Что делать администратору при появлении ошибки?

Если ошибка 500 появилась на вашем сайте, попробуйте следующие способы.

Проверить файл htaccess

Загляните в файл htaccess: даже небольшая синтаксическая ошибка может вызывать внутреннюю ошибку сервера. Не менее часто случается так, что этот файл неправильно отформатирован. Его нужно создавать в формате ASCII или ANSI, а не в Unicode. Следовательно, писать его следует в текстовом редакторе, например в Notepad, Notepad++ и Sublime Text, а не в Microsoft Word.

Чтобы проверить, является ли файл htaccess причиной ошибки, можно временно переименовать его и перезагрузить сайт. После этого сервер не будет обращаться к htaccess при загрузке страницы. Если сообщение об ошибке больше не появляется, значит стоит исправить этот файл или создать новый.

Проверить лог ошибок

Загляните в лог-файл, например для серверов Linux его можно найти по адресу /var/log/httpd/error_log. Попробуйте перезагрузить сайт, чтобы воспроизвести код ошибки 500, и посмотреть, как создается лог-файл. Это поможет быстро найти источник проблемы.

Проверить содержимое CGI-скриптов

Ошибки могут возникать, если разрешения для важных файлов установлены неправильно. Есть три типа прав:

  • read (r) — чтение;
  • write (w) — запись;
  • execute (x) — выполнение.

Эти разрешения можно предоставлять трем типам пользователей:

  • владельцу файла;
  • группе пользователей;
  • все остальным.

Права указываются либо с помощью сокращений r, w и x, либо с помощью числовых значений: 4 — для чтения, 2 — для записи и 1 — для выполнения. Они добавляются для каждого типа пользователей и идут один за другим: rwxr-xr-x (rwx — для владельца, r-x — для группы и r-x — для всех остальных) или 755.

По умолчанию должна быть установлена конфигурация 755. Если разрешения предоставляются иначе, может возникнуть ошибка. Эту настройку можно изменить с помощью команды: chmod 755 filename.

Если проблема не решится, можно также провести тестирование, предоставив все права для каждой группы: chmod 777 filename. Однако к этой настройке следует прибегать только для определения проблемы — если любой пользователь сможет переписывать файл, безопасность сайта окажется под угрозой.

Проверить плагины и компоненты

Новое ПО, надстройки и сторонние скрипты могут конфликтовать с текущей конфигурацией сервера. Чтобы выявить причину ошибки 500, попробуйте поочередно отключить или удалить программные дополнения.

И напротив, если вы недавно обновили ПО, текущие плагины и темы могут оказаться несовместимы с обновлением. Деактивация дополнений по порядку — лучший способ найти основную причину проблемы.

Увеличить объем оперативной памяти сервера

Лимит памяти определяет, какой ее объем может задействовать процесс. Если какой-либо процесс требует больше памяти, чем доступно, может возникать ошибка 500.

Чтобы это исправить, можно временно увеличить лимит памяти. Для этого добавьте в php.ini команду, подобную этой: memory_limit = 512M. Этот пример устанавливает лимит на 512 МБ.

Учитывайте, что хостинг-провайдер допускает лишь определенный лимит сеанса PHP в рамках используемого вами пакета. Если будет введено большее значение, сервер проигнорирует его. Также помните, что это лишь временное решение: как только сайт заработает, потребуется выяснить причину высокого потребления памяти. Высока вероятность, что в коде содержится ошибка.

Если ни один из этих способов не помог, стоит связаться с хостинг-провайдером. Но прежде чем сделать это, проверьте состояние серверов: при возникновении проблем многие провайдеры сообщают эту информацию на странице состояния или в социальных сетях.

В статье использовались материалы следующих источников:

Blog.hubspot.com 

Ionos.com

Businessinsider.com

Lifewire.com

Подписывайтесь на наш Telegram-канал, чтобы быть в курсе последних новостей и событий!

Разработчики и люди, профессионально работающие с веб-приложениями, боятся 500 Internal Server Error. Оптимальный способ её устранения зависит от сервера и того, что на нём запущено. В данной статье приводятся советы по диагностике и исправлению ошибки 500.

  • Ошибка 500 Internal Server Error — диагностика
  • Ошибка 500 Internal Server Error — устранение на популярных платформах
  • Ошибка 500 Internal Server Error — устранение на стороне серверных скриптов
  • Попросите помощи у системного администратора
  • Ошибку 500 Internal Server Error довольно легко устранить

Важно помнить, что эта ошибка происходит на стороне сервера. Это значит, что HTML-код, выполняемый на стороне клиента, а также JavaScript или любые другие запущенные в браузере объекты, не могут быть причиной, по которой возникает ошибка 500 Internal Server Error. Само название (Internal Server Error – ‘внутренняя ошибка сервера’) говорит о том, что ошибка происходит на сервере.

Многие пользователи устанавливают на свой сервер популярные CMS-системы, такие как WordPress, Joomla, Drupal и они не должны вызывать ошибку 500, если всё настроено правильно. Однако она всё равно всплывает – из-за несовместимости версий, некачественных установок или сбоя прав доступа на сервере.

Вот некоторые распространённые проблемы, которые могут вызывать подобную ошибку в часто используемых CMS:

  • Если вы только что обновили движок до новой версии, вероятно, обновление прошло с ошибками и необходимо провести его повторно. Скорее всего, на сайте разработчика есть инструкции, как это правильно сделать.
  • Если вы только что активировали новый плагин или новую тему, стоит попробовать отменить эти изменения. Даже профессионально написанные плагины могут конфликтовать с другими и вызывать 500 Internal Server Error nginx
  • Если вы обновляли CMS, старые плагины и темы могут быть с ней несовместимы. Единственное, что можно сделать в таком случае — отключать их по очереди, пока ошибка 500 не исчезнет.
  • Неправильно заданные права доступа на сервере или ошибки в файле .htaccess. Серверу не удаётся получить доступ к скриптам, файлам и другим ресурсам, поэтому он выдаёт ошибку.

Когда причиной, по которой возникает ошибка 500 Internal Server Error являются скрипты и плагины, лучше всего искать ответы на сайтах их разработчиков.

Другой причиной по которой может возникнуть ошибка 500 Internal Server Error может стать разработка и тестирование собственных скриптов.

Чтобы справиться с такой ошибкой, попробуйте следующие решения:

  • Настройка прав на сервере: часто неверная настройка прав доступа к файлу или папке приводит к тому, что сервером выдаётся ошибка 500 Internal Server Error. Из-за того, что ему не удаётся запустить скрипт. Выясните, какие права должны быть настроены, и выставьте их соответствующим образом.
  • Превышено время ожидания: возможно, истекло время ожидания ответа от PHP или другого серверного скрипта. Это происходит из-за того, что недоступен определённый ресурс или коде была допущена ошибка, запускающая бесконечный цикл.
  • Превышено время ожидания соединения с сервером: если сервер был занят, перезагружался или потерял соединение, скрипт может выдать ошибку 500 Internal Server Error. Возможно, в следующий раз ошибки не будет. Но если ошибка появляется при тестировании, велика вероятность того, что она встретится и пользователям.
  • Ошибки в файле .htaccess: в некоторых случаях ошибку 500 может вызывать код, прописанный в файле .htaccess.
  • Ошибки в скрипте: если ошибку выдаёт скрипт, можете запросить у него подробную информацию об ошибке. К примеру, в PHP можно включить вывод ошибок на экран или в лог-файл, добавив директиву display_errors. По умолчанию среда выполнения может скрывать ошибки, но это не очень удобно для отладки программы.

В некоторых случаях у разработчиков нет полного контроля над сервером.

Если скрипт запускается на сервере сторонней организации, она может помочь вам в следующем:

  • Предоставить документацию о своём сервере и возможных причинах ошибки 500. В зависимости от используемой операционной системы и настройки оборудования, данная ошибка может возникать по разным причинам.
  • Попросите службу поддержки хостинга посмотреть лог-файлы с ошибками — системный администратор сможет определить, был ли сервер во время возникновения ошибки загружен или вовсе «упал».

Ошибка 500 Internal Server Error — как исправить? В большинстве случаев причины возникновения ошибки 500 легко исправляются. Проблема заключается в том, что без конкретной информации определение причины возникновения сбоя усложняется. Легче всего справиться с ошибкой, когда разработчик выяснит, что изменилось перед возникновением ошибки.

Не забывайте, что произошедшие изменения могли быть осуществлены и другими людьми — например, администратором сервера. Если же ничего не менялось, вероятно, сам сервер стал причиной возникновения ошибки из-за несовместимости программного обеспечения или проблем с производительностью.

Понравилась статья? Поделить с друзьями:
  • Tes online ошибка входа
  • The above error occurred while the web server was processing your request перевод
  • Tes online ошибка 210
  • The above error occurred in one of your react components
  • Tes online как изменить внешность