Rate This Document
Findability
Accuracy
Completeness
Readability

Error "HTTP 500" Reported During OpenStack Command Execution

Symptom

The following error message is displayed when the OpenStack commands are executed:

ERROR: The server has either erred or is incapable of performing the requested operation. (HTTP 500)

This error occurs occasionally and irregularly.

Key Process and Cause Analysis

  1. Check the logs of the error-related components (such as Nova and Cinder). The following error information is displayed:
    Figure 1 Error logs
  2. Run the following command to check whether the number of MySQL connections is close to 28,231:
    netstat -a|grep mysql|grep "^tcp"|wc -l

Conclusion and Solution

Reduce the number of connections in the TIME_WAIT state. Perform the following steps:

  1. Temporarily configure kernel parameters related to TCP connections.
    sysctl -w net.ipv4.tcp_tw_reuse=1
    sysctl -w net.ipv4.tcp_fin_timeout=30
    sysctl -w net.ipv4.tcp_max_tw_buckets=10000
  2. Modify the system configuration file /etc/sysctl.conf.
    1. Open the file.
      vi /etc/sysctl.conf
    2. Press i to enter the insert mode and add the following content:
      net.ipv4.tcp_tw_reuse=1
      net.ipv4.tcp_fin_timeout=30 
      net.ipv4.tcp_max_tw_buckets=10000
    3. Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.
    4. Make the configuration take effect.
      sysctl -p