tencent cloud


Terminating Compute Instances

Last updated: 2024-01-22 22:15:47


    This practice provides a better method to terminate CVM instances when you need to dynamically adjust the compute instances for a Turbo file system. This method avoids lock conflict caused by improper operations. When users need to terminate CVM instances, they usually call TerminateInstances. However, this API will force the instances to shut down (similar to cutting off the power) and return them. This method achieves fast termination, but for CFS Turbo, a strongly consistent distributed file system, the force client disconnection will make the server lock recall abnormal, which will lead to IO hangs. To avoid affecting business, we recommend ‍you terminate instances using the method provided in this document.


    Shutting down CVM instances

    Call StopInstances to shut down instances, with StopType set to SOFT_FIRST. A soft shutdown will be performed. If the soft shutdown fails within 5 minutes, a forced shutdown will be performed. This method takes the timeliness of the shutdown into account, without affecting the normal use of the Turbo file system.
    1. Do not set StopType to HARD (forced shutdown).
    2. When you perform a shutdown using the console, do not select forced shutdown. Select SOFT_FIRST.
    3. A soft shutdown terminates processes in an orderly manner and performs a sync operation, minimizing the impact of a forced shutdown on the distributed lock in a Turbo file system.

    Terminating instances

    Call DescribeInstancesStatus to query the status of the instances. When the status is STOPPED, call TerminateInstances to terminate the instances.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support