Method and device for file transfer protocol deadlock detection and self recovery
First Claim
1. A method for File Transfer Protocol (FTP) deadlock detection and self recovery, comprising the following steps:
- determining, by a daemon configured in a network element, whether a deadlock occurs in an FTP upload task through a heartbeat detection mechanism, if the deadlock occurs, then recording socket resources used by an FTP upload operation at a storage location in a socket resource cycle queue which is created in the network element, and starting an FTP upload task end process; and
determining whether the socket resource cycle queue is full, if it is not full, then putting socket resource information occupied by the current deadlock into the socket resource cycle queue, if it is full, then releasing earliest socket resources from the socket resource cycle queue, and putting the socket resource information occupied by the current deadlock into the socket resource cycle queue.
1 Assignment
0 Petitions
Accused Products
Abstract
A method and a device for file transfer protocol (FTP) deadlock detection and self recovery are provided by the disclosure in order to solve the sudden deadlock problem in the FTP upload operation. The method includes: if a daemon determines that a deadlock occurs in an FTP upload task by a heartbeat detection mechanism, the socket resources used by the FTP upload operation is recorded at the storage location in a socket resource cycle queue, and an FTP upload task end process is started; determining whether the socket resource cycle queue is full, if it is not full, the socket resource information occupied by the current deadlock is put into the socket resource cycle queue, otherwise, the earliest socket resources in the socket resource cycle queue are released, and the socket resource information occupied by the current deadlock is put into the socket resource cycle queue.
60 Citations
11 Claims
-
1. A method for File Transfer Protocol (FTP) deadlock detection and self recovery, comprising the following steps:
-
determining, by a daemon configured in a network element, whether a deadlock occurs in an FTP upload task through a heartbeat detection mechanism, if the deadlock occurs, then recording socket resources used by an FTP upload operation at a storage location in a socket resource cycle queue which is created in the network element, and starting an FTP upload task end process; and determining whether the socket resource cycle queue is full, if it is not full, then putting socket resource information occupied by the current deadlock into the socket resource cycle queue, if it is full, then releasing earliest socket resources from the socket resource cycle queue, and putting the socket resource information occupied by the current deadlock into the socket resource cycle queue. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A device for File Transfer Protocol (FTP) deadlock detection and self recovery, comprising:
- a heartbeat detection initiating module and a buffer queue managing module, wherein
the heartbeat detection initiating module is configured to determine whether a deadlock occurs in an FTP upload task through a heartbeat detection mechanism; and the buffer queue managing module is configured to record socket resources used by an FTP upload operation at a storage location in an assigned socket resource cycle queue, and start an FTP upload task end process; and
further configured to determine whether the socket resource cycle queue is full, if it is not full, then put socket resource information occupied by the current deadlock into the socket resource cycle queue, if it is full, then release earliest socket resources from the socket resource cycle queue, and is put the socket resource information occupied by the current deadlock into the socket resource cycle queue. - View Dependent Claims (7, 8, 9)
- a heartbeat detection initiating module and a buffer queue managing module, wherein
-
10. A system for File Transfer Protocol (FTP) deadlock detection and self recovery, comprising a daemon, an FTP upload task unit, a socket resource cycle queue and an FTP server, wherein
the daemon is configured to determine that a deadlock occurs in an FTP upload task through a heartbeat detection mechanism, and then record socket resources used by an FTP upload operation at a storage location in an assigned socket resource cycle queue, and start an FTP upload task end process; - and further configured to determine whether the socket resource cycle queue is full, if it is not full, then put socket resource information occupied by the current deadlock into the socket resource cycle queue, otherwise, release earliest socket resources from the socket resource cycle queue, and put the socket resource information occupied by the current deadlock into the socket resource cycle queue;
the FTP upload task unit is configured to return a heartbeat response in response to the heartbeat detection of the daemon, acquire data from the daemon, establish a connection with the FTP and upload the acquired data to the FTP server; the socket resource cycle queue is configured to store socket resources used by the FTP upload operation each time a deadlock occurs; and the FTP server is configured to receive data uploaded by the FTP upload task. - View Dependent Claims (11)
- and further configured to determine whether the socket resource cycle queue is full, if it is not full, then put socket resource information occupied by the current deadlock into the socket resource cycle queue, otherwise, release earliest socket resources from the socket resource cycle queue, and put the socket resource information occupied by the current deadlock into the socket resource cycle queue;
Specification