No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

HUAWEI CLOUD Stack 6.5.0 Alarm and Event Reference 04

Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
ALM-73412 Long Transaction Found in GaussDB

ALM-73412 Long Transaction Found in GaussDB

Description

This alarm is generated when a transaction in GaussDB is executed over 60 minutes. One possible cause for a long transaction is that the transaction is not submitted. The long transaction will be automatically cleared, and you need to manually clear the alarm.

Attribute

Alarm ID

Alarm Severity

Auto Clear

73412

Major

No

Parameters

Name

Meaning

Fault Location Info

hostname: specifies the name of the host for which the alarm is generated.

Additional Info

  • detail_info: provides detailed information about the alarm.
  • hostname: specifies the name of the host for which the alarm is generated.
  • Service: specifies the service for which the alarm is generated.
  • MicroService: specifies the name of the component for which the alarm is generated.

Impact on the System

A long transaction is recorded in GaussDB when this alarm is generated. If the long transaction exists for long time, data tables in the database may become oversized, and all connections will be used. As a result, database access errors will occur. The system will automatically clear the long transaction, but you need to check whether the system is affected.

Possible Causes

  • The transaction fails to submit.
  • The OS load is high.

Procedure

  1. Log in to the host for which the alarm is reported based on HOST_ID in the locating information as user fsp.

    Run the su - root command to switch to user root.

    • The default password of user fsp is Huawei@CLOUD8. The default password of user root is Huawei@CLOUD8!.

  2. Import environment variables and use CPS authentication. For details, see Importing Environment Variables.
  3. Identify the database IP address.

    Run the following command:

    cat /etc/gaussdb/gaussdb/fsp_gaussdb.ini | grep float_ip

    Query the execution result.

    • If information similar to "float_ip = 172.28.8.100" is displayed in the command output, the command execution is successful. Go to 4
    • If the command execution fails, go to 6.

  4. Log in to the database.

    Run the following command:

    su - gaussdba -c "gsql dbname -U openstack -W db_passwd -h host_ip -p 5432;"

    Query the execution result.

    • If information similar to "dbname=>" is displayed in the command output, the command execution is successful, indicating that the database enters the command interaction mode. In this case, go to 5.
    • If the command execution fails, go to 6.
    NOTE:

    db_name indicates the name of the database that reports the alarm. The value is the same as that of [] in the additional information. db_passwd is the password used by FusionSphere OpenStack to access the database. The default password is FusionSphere123. host_ip is the value of float_ip obtained in 3.

  5. Query details of the long transaction.

    Run the following command:

    select datname,pid,now()-xact_start AS interval,query,usename,application_name,client_addr,client_hostname,client_port,xact_start,query_start,state FROM pg_stat_activity WHERE state in ('idle in transaction') AND now()-xact_start> interval '60 min' ORDER BY interval DESC;

    Query the execution result.

     DATNAME |  PID  |    INTERVAL     |       QUERY        |       ...      |        STATE        
    ---------+-------+-----------------+--------------------+------ ... -----+---------------------
     NOVA    | 27530 | 01:20:24.877987 | start transaction; |       ...      | idle in transaction
    (1 row)
    NOTE:

    You can press q to quit the result view.

    • If 0 row is displayed in the last row, the long transaction is automatically cleared. Check whether any new alarms are generated when next audit is complete. If yes, clear the alarms based on the alarm online help.
    • If any specific data is displayed or the command execution failed, go to 6.

  6. Contact technical support for assistance.

Related Information

Manually Clear a Long Transaction

  1. If you need to manually clear a long transaction, perform 5 to obtain the long transaction PID and run the following command:

    select pg_terminate_backend(pid);

    Query the execution result.

     NOVA=# select pg_terminate_backend(27530);
     PG_TERMINATE_BACKEND 
    ----------------------
     t
    (1 row)
    • If the command execution is successful, t is returned.
    • If the operation fails, contact technical support for assistance.

Translation
Download
Updated: 2019-08-30

Document ID: EDOC1100062365

Views: 36112

Downloads: 31

Average rating:
This Document Applies to these Products
Related Version
Related Documents
Share
Previous Next