Skip to content

How to fix 500 internal server error in Odoo

If your Odoo instance is returning a 500 Internal Server Error, follow these steps to diagnose and resolve the issue.

Section titled “If your Odoo instance is returning a 500 Internal Server Error, follow these steps to diagnose and resolve the issue.”

Step 1: Check the Odoo Logs in the Cloudpepper Dashboard

Section titled “Step 1: Check the Odoo Logs in the Cloudpepper Dashboard”
  1. Go to your Cloudpepper Dashboard and open the affected Odoo instance.
  2. Navigate to the Logs tab to check for recent errors.

💡 Tip: Use the Search button and enter "Error" to quickly filter all log lines at the Error level.

If an error log entry appears, it will provide insight into the root cause, helping you determine the best resolution. In many cases, the issue is caused by a custom module introducing breaking changes. Other common causes include memory exhaustion or a failed connection to the PostgreSQL database.

If the issue started after installing or updating a custom module

Section titled “If the issue started after installing or updating a custom module”

If the 500 error started immediately after installing or updating a custom module, do not simply remove the module folder from your repository. The module may still be referenced in your database, which can leave the instance in a broken state.

Instead, revert the module code in your Git repository to the last known stable version. If needed, you can also temporarily comment out the broken code to restore access.

After reverting the code, go to your Odoo instance in My Cloudpepper, open the Addons tab, and update the Git repository so the working version is deployed again.

Section titled “After reverting the code, go to your Odoo instance in My Cloudpepper, open the Addons tab, and update the Git repository so the working version is deployed again.”

If your server is running low on resources, it can cause one or more Odoo instances to become unstable or unresponsive. To check resource usage:

  1. Open the server associated with your Odoo instance in the Cloudpepper dashboard.
  2. Go to the Monitoring tab to view CPU, RAM, disk space, and database connection usage over time.
  3. Ensure:
  • CPU and RAM usage remain below 80% for optimal performance.
  • Sufficient disk space is available to prevent write failures.
  • Database connections are not exceeding the limit set in your PostgreSQL configuration.

If resource limits are being exceeded, consider upgrading your server, optimizing your Odoo configuration, or reducing active processes.