2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

500 Internal Server Errorとは何か・解決方法

Posted at

プログラミング勉強日記

2020年12月19日
検証ツールで500 Internal Server Errorが表示されて正しく表示されない状況に陥ったので、500 Internal Server Errorの意味と解決方法を簡単に紹介する。

500 Internal Server Errorとは

 簡単に言うと、サーバー側に問題があるときに表示されるエラーである。プログラム自体へのアクセスはできるが、実行ができない・処理が完了しない場合に発生するエラーで、考えられる要因として以下のようなものがある。

  • CGIやPHPの同時接続数が多くなり、アカウント単位のリソース制限となっている
  • スペルミス等のプログラムの記述内容に誤りがある
  • .htaccessの記述に誤りがある
  • パーミッションに誤りがある

(参考文献)

解決方法

 詳しいエラーは、ログファイルからエラーログで確認するとわかるので、エラーログをみて確認する。スペルミスのようなプログラムの記述内容に誤りがあることが大半だと思う。
 私の場合は、IntelliJ IDEAを利用していて起きたエラーだったのでその解決方法を残しておく。

IntelliJ IDEAを使用してGradleプロジェクトを扱っている場合

 私の場合は、WindowsでIntelliJ IDEAを使用するときに文字化けを直すためにFileSettingsメニューからBuild and run usingRun tests usingIntelliJ IDEAにしていた。

image.png

 この設定が500 Internal Server Errorを引き起こしていた。なので、デフォルトのGradleに戻すことでエラーは解消された。
image.png

参考文献

「500 Internal Server Error」というエラーが表示されてホームページが見られません。
JQuery Ajax Postで500内部サーバーエラーが発生する

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?