CN114546611A - Method, equipment and medium for adjusting interface calling timeout time - Google Patents

Method, equipment and medium for adjusting interface calling timeout time Download PDF

Info

Publication number
CN114546611A
CN114546611A CN202210053213.5A CN202210053213A CN114546611A CN 114546611 A CN114546611 A CN 114546611A CN 202210053213 A CN202210053213 A CN 202210053213A CN 114546611 A CN114546611 A CN 114546611A
Authority
CN
China
Prior art keywords
time
timeout
calling
overtime
call
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210053213.5A
Other languages
Chinese (zh)
Inventor
田卡
吴义良
张亚博
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Wanwu Xinsheng Environmental Technology Group Co
Original Assignee
Shanghai Wanwu Xinsheng Environmental Technology Group Co
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Wanwu Xinsheng Environmental Technology Group Co filed Critical Shanghai Wanwu Xinsheng Environmental Technology Group Co
Priority to CN202210053213.5A priority Critical patent/CN114546611A/en
Publication of CN114546611A publication Critical patent/CN114546611A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0751Error or fault detection not based on redundancy
    • G06F11/0754Error or fault detection not based on redundancy by exceeding limits
    • G06F11/0757Error or fault detection not based on redundancy by exceeding limits by exceeding a time limit, i.e. time-out, e.g. watchdogs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/544Remote

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application provides a method for adjusting interface calling overtime time, firstly, an interface is operated in a first time length range after first overtime time of the interface is obtained, interface calling data are obtained through the first overtime time and the operation condition, and the calling data can comprise overtime retry times caused by overtime, overtime failure times caused by overtime and calling time consumption; then, judging whether the sum of the overtime retry times and the overtime failure times in the calling data is greater than a first threshold value; if the first timeout time is greater than the first threshold, increasing the first timeout time; if so, reducing the first timeout time. The scheme solves the problems that in the prior art, when the overtime time of the calling interface is modified manually, the overtime time in the configuration file can be effective only by restarting the related application, and under the condition that the overtime time is pulled by using the configuration center, the overtime time cannot be modified in the configuration center in time by manual operation, so that a system is dragged due to abnormal interface calling, and system accidents are caused or the interface cannot be called.

Description

Method, equipment and medium for adjusting interface calling timeout time
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, a device, and a medium for adjusting interface call timeout.
Background
When the computer calls the interface of the third-party service, in order to avoid that the time for calling the external interface is too long so as to influence the normal operation of the system, the time-out time is often set for calling the external interface, and when the application does not obtain the response of the third-party interface within the time-out time, the system judges that the abnormal termination or retry is performed. The current method for setting the timeout time is to directly set in the configuration file of the application, or to set in the configuration center in a configuration centralization manner, and then dynamically pull by each application.
Both of the two methods have some defects, and for the method of setting the timeout time by using the configuration file, when the interface performance changes, the new timeout time needs to be manually estimated and the configuration file needs to be modified, and the new configuration file needs to be restarted to take effect when the new configuration file takes effect. Yet another way to set the interface timeout time using the configuration center, while it may be effective without restarting the application, still requires manual prediction of the new timeout time and modification at the configuration center, and still causes system accidents if found later by the human. Therefore, the problem that when the timeout time of the calling interface is manually modified, the timeout time in the configuration file can only take effect by restarting the related application, and when the timeout time is pulled by using the configuration center, the timeout time cannot be modified in the configuration center in time due to the fact that the performance of the interface is found to be changed later manually, so that the system is dragged and crashed due to abnormal interface calling, or the interface cannot be called cannot be solved in the prior art.
Disclosure of Invention
An object of the present application is to provide a method for solving the problems in the prior art that when the timeout time of a calling interface is manually modified, the timeout time in a configuration file needs to be restarted to take effect, and when the timeout time is pulled by using a configuration center, the change of the performance of the interface is manually found to be late, and the timeout time cannot be modified in the configuration center in time, so that a system is dragged down due to an abnormal interface calling, thereby causing a system accident or never calling the interface.
In order to achieve the above object, the present application provides a method for adjusting interface call timeout, including:
acquiring a first timeout time of an interface;
operating the interface within a first time length range based on the first timeout time;
acquiring calling data of the interface in a first time length range, wherein the calling data comprises overtime retry times caused by overtime, overtime failure times caused by overtime and calling time consumption;
judging whether the sum of the overtime retry times and the overtime failure times is larger than a first threshold value;
if the first timeout time is greater than the first threshold, increasing a first timeout time; if not, the first timeout time is reduced.
Further, increasing the first timeout time includes:
the first timeout time is increased by 200 milliseconds.
Further, reducing the first timeout time comprises:
and reducing the first timeout time according to the calling time consumption in the calling data.
Further, reducing the first timeout time according to the call elapsed time in the call data includes:
calculating a first expected value of the calling time and a first standard deviation of the calling time by using normal distribution according to the calling time in the calling data;
and reducing the first timeout time according to the first expected value of the calling consumed time and the first standard deviation of the calling consumed time.
Further, reducing the first timeout time according to the first expected value of the call elapsed time and the first standard deviation of the call elapsed time includes:
comparing the first expected value and/or the first standard deviation with a second expected value and/or a second standard deviation respectively, wherein the second expected value is an expected value obtained by calculating the calling time consumption in the calling data acquired when the interface is adjusted to call the timeout time last time, and the second standard deviation is a standard deviation obtained by calculating the calling time consumption in the calling data acquired when the interface is adjusted to call the timeout time last time;
and if the first expected value is smaller than a second expected value and/or the first standard deviation is smaller than a second standard deviation, reducing the first timeout time according to the first expected value of the call consumed time and the first standard deviation of the call consumed time.
Further, reducing the first timeout time according to the first expected value of the call elapsed time and the first standard deviation of the call elapsed time includes:
adding the first expected value of the calling time consumption and the first standard deviation of the calling time consumption which is N times to obtain an overtime time adjustment value, wherein N is a positive integer;
setting the timeout adjustment value to a first timeout.
Further, adding the first expected value of the calling time consumption and the first standard deviation of N times of the calling time consumption to obtain an timeout time adjustment value, including:
and adding the first expected value of the calling time consumption and the first standard deviation of 2 times of the calling time consumption to obtain an overtime time adjustment value.
Further, setting the timeout adjustment value to a first timeout includes:
comparing the timeout adjustment value to the first timeout;
and if the timeout time adjustment value is smaller than the first timeout time, setting the timeout time adjustment value as the first timeout time.
The present application also provides an apparatus for adjusting interface call timeout, the apparatus comprising a memory for storing computer program instructions and a processor for executing the computer program instructions, wherein the computer program instructions, when executed by the processor, trigger the apparatus to perform any of the methods described above.
The present application also provides a computer readable medium having stored thereon computer program instructions executable by a processor to implement the method of any of the above.
Compared with the prior art, the method for adjusting the calling timeout time of the interface comprises the steps of firstly obtaining the first timeout time of the interface and then operating the interface within a first time length range, obtaining calling data of the interface through the first timeout time and the operating condition, wherein the calling data can comprise the number of times of timeout retry caused by timeout, the number of times of timeout failure caused by timeout and the time consumed for calling; then, judging whether the sum of the overtime retry times and the overtime failure times in the calling data is greater than a first threshold value; if the first timeout time is greater than the first threshold, increasing the first timeout time; if so, reducing the first timeout time. The scheme solves the problems that in the prior art, when the overtime time of the calling interface is manually modified, the overtime time in the configuration file can be effective only by restarting the related application, and under the condition that the overtime time is pulled by using the configuration center, the overtime time cannot be modified in the configuration center timely due to the fact that the performance of the interface is found to be changed late manually, so that the system is dragged and collapsed due to abnormal interface calling, and system accidents are caused or the interface cannot be called.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is a flow chart of one embodiment of a method described herein;
FIG. 2 is a schematic diagram of one embodiment of a method described herein;
the same or similar reference numbers in the drawings identify the same or similar elements.
Detailed Description
In a typical configuration of the present application, the terminal, the device serving the network, and the trusted party each include one or more processors (CPUs), input/output interfaces, network interfaces, and memory. The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory computer readable media (transient media), such as modulated data signals and carrier waves.
The application provides a method for adjusting interface calling timeout, which comprises the following steps:
step S101: acquiring a first timeout time of an interface;
step S102: operating the interface within a first time range based on the first timeout;
step S103: acquiring calling data of the interface in a first time length range, wherein the calling data comprises overtime retry times caused by overtime, overtime failure times caused by overtime and calling time consumption;
step S104: judging whether the sum of the overtime retry times and the overtime failure times is larger than a first threshold value;
step S105: if the first timeout time is greater than the first threshold, increasing a first timeout time; if not, the first timeout time is reduced.
The present application is described in further detail below with reference to fig. 1.
Step S101: a first timeout of an interface is obtained.
And acquiring a first timeout time of the interface, wherein the first timeout time comprises the longest time from the beginning of calling the interface to the receipt of the feedback information, and the call beyond the first timeout time can be judged to be failed or start to retry. The initial first timeout period may be set by the user and may be adjusted thereafter according to the methods described herein.
Step S102: operating the interface within a first time range based on the first timeout;
the interface is operated in a first timeout range, the first timeout range can be a specific time length, the time length can be preset by a user, the interface can be operated by calling the interface for many times, so that the called working condition of the interface can be observed, stable working condition data can be obtained, and the working condition of the interface can be the timeout condition for discriminating the calling work of the interface according to the first timeout time.
Step S103: and acquiring the calling data of the interface in the first time length range, wherein the calling data comprises the times of timeout retry caused by timeout, the times of timeout failure caused by timeout and the calling time consumption.
The obtained call data can be call data formed by the working condition of the interface in the first time range, and the call data can record the times of retries and failures of the interface caused by exceeding the first timeout time in a plurality of calls in the first time range and the time consumed for calling the interface each time.
Step S104: and judging whether the sum of the timeout retry number and the timeout failure number is larger than a first threshold value.
And after adding the overtime retry times and the overtime failure times in the calling data, judging whether the value is larger than a first threshold value. The first threshold may be preset by a user, and is used for evaluating whether the call time of the interface needs to be reduced or increased, and when the interface performance is good, the call time is shorter, and when the interface performance is reduced, the call time is longer.
Step S105: if the first timeout time is greater than the first threshold, increasing a first timeout time; if not, the first timeout time is reduced.
When the sum of the retry times and the failure times of the interface is greater than a first threshold, it indicates that the performance of the interface is reduced, and the length of the first timeout time needs to be increased, and if the sum is less than the first threshold, it indicates that the performance of the interface is better, and the first timeout time of the interface can be reduced, so that more resources can be released as soon as possible.
In some embodiments of the present application, increasing the first timeout time may be increasing the first timeout time by 200 milliseconds.
When the first timeout is required to be increased, the system may directly increase the first timeout time by 200 ms without manual operation, and the increased value may be preset by the user according to practical situations, for example, directly increase by 300 ms or 100 ms, etc.
In other embodiments of the present application, the reducing the first timeout period may be reducing the first timeout period according to a time consumed by the call in the call data.
When the interface performance is good and the sum of the retry number and the failure number is smaller than the first threshold, the first timeout time should be reduced, and at this time, the first timeout time may be reduced according to the call time consumption in the call data.
In other embodiments of the present application, the first timeout time is reduced according to the call elapsed time in the call data, which may be calculating a first expected value of the call elapsed time and a first standard deviation of the call elapsed time by using normal distribution according to the call elapsed time in the call data, and reducing the first timeout time according to the first expected value of the call elapsed time and the first standard deviation of the call elapsed time.
The first timeout time is reduced according to the call time consumption in the call data, which may be calculating the call time consumption of each call of the interface running in the first time length range by normal distribution to obtain a first expected value, calculating a first standard deviation between each time consumption and the first expected value, the first expected value represents the average elapsed time that this interface is invoked over a first range of time lengths, and the first standard deviation represents the average deviation degree of each time consumption from the average time consumption, so as to obtain a reasonable fluctuation range close to the first expected value, for example, if it takes 300 milliseconds, 400 milliseconds, 100 milliseconds, 800 milliseconds, 500 milliseconds, 600 milliseconds, 900 milliseconds, 700 milliseconds, 200 milliseconds, 800 milliseconds to acquire 10 calls in the first time length range, the average time taken is 530 milliseconds, the standard deviation is 275.08 milliseconds, the meaning is that the interface call takes a reasonable range of time from 254.92 milliseconds to 805.08 milliseconds. And then the duration of the first timeout time is reduced according to the calculated first expected value and the first standard deviation.
In other embodiments of the present application, the first timeout time is reduced according to a first expected value of the call elapsed time and a first standard deviation of the call elapsed time, where the first expected value and/or the first standard deviation may be compared with a second expected value and/or a second standard deviation, respectively, where the second expected value is an expected value obtained by calculation based on the call elapsed time in the call data obtained when the interface call timeout time is adjusted last time, and the second standard deviation is a standard deviation obtained by calculation based on the call elapsed time in the call data obtained when the interface call timeout time is adjusted last time; and if the first expected value is smaller than a second expected value and/or the first standard deviation is smaller than a second standard deviation, reducing the first timeout time according to the first expected value of the call consumed time and the first standard deviation of the call consumed time.
In reducing the first timeout period according to the first expected value and the first standard deviation, the first expected value and the first standard deviation in the first duration range may be compared with an expected value and a standard deviation according to the previous adjustment, the previous adjustment may be an adjustment performed manually, or may be an adjustment performed according to a second expected value and a second standard deviation calculated in the first duration range last time, the second expected value includes an expected value calculated from the call elapsed time in the call data acquired when the first timeout period was adjusted last time, the second standard deviation includes a standard deviation calculated from the call elapsed time in the call data acquired when the first timeout period of the interface was adjusted last time, and when the second expected value and the second standard deviation are taken as a basis for adjusting the first timeout period last time, the first expected value and the first standard deviation calculated in the first duration range this time are compared with each other, when the first expected value is less than the second expected value and/or the first standard deviation is less than the second standard deviation, then the first timeout time is decreased.
In other embodiments of the present application, the first timeout time is reduced according to the first expected value of the call elapsed time and the first standard deviation of the call elapsed time, which may be obtained by adding the first expected value of the call elapsed time and N times of the first standard deviation of the call elapsed time, where N is a positive integer; and setting the timeout adjusting value as a first timeout.
When the first timeout time is decreased according to the first expected value of the call elapsed time and the first standard deviation of the call elapsed time, the first expected value may be added to N times of the first standard deviation of the call elapsed time, and the value is used as a timeout time adjustment value, where N may be any positive integer, for example, the first expected value is 530 milliseconds, the standard deviation is 275.08 milliseconds, and N is set to 1, the timeout time adjustment value is 805.08 milliseconds, and then the first timeout time is set to 805.08 milliseconds.
In other embodiments of the present application, the first expected value of the call elapsed time is added to the first standard deviation of the call elapsed time N times to obtain the timeout adjustment value, where the first expected value of the call elapsed time is added to the first standard deviation of the call elapsed time 2 times to obtain the timeout adjustment value.
When the timeout adjustment value is obtained by adding the first expected value of the call elapsed time to N times the first standard deviation of the call elapsed time, N may be set to 2, for example, the first expected value is 530 milliseconds, N is 2, the standard deviation is 275.08 milliseconds, and the timeout adjustment value is 1080.16 milliseconds.
In some embodiments of the present application, setting the timeout period adjustment value to a first timeout period may be comparing the timeout period adjustment value with the first timeout period; and if the timeout time adjustment value is smaller than the first timeout time, setting the timeout time adjustment value as the first timeout time.
After the adjustment value of the timeout time is calculated and obtained, the adjustment value of the timeout time may be compared with the first timeout time, and if the adjustment value of the timeout time is smaller than the first timeout time, the adjustment value of the timeout time is used as a new first timeout time. The scheme is to prevent the situation that the calculated timeout period adjustment value is greater than or equal to the first timeout period, and when the calculated timeout period adjustment value is greater than or equal to the first timeout period, the first timeout period cannot be reduced according to the timeout period adjustment value, for example, when N is an infinite value, the timeout period adjustment value is always greater than or equal to the first timeout period. Therefore, the first timeout time does not need to be adjusted when the timeout time adjustment value is greater than or equal to the first timeout time.
Fig. 2 is a schematic diagram of one embodiment of the method of the present application, which is described in further detail below with reference to fig. 2.
Step S201: a first timeout is obtained at a configuration center. The first timeout is stored in the configuration center so that it can be retrieved from this configuration center when the interface needs to be called.
Step S202: the interface is operated for a first time period. While the interface is running, relevant data of the interface operation can be collected or recorded, including calling data.
Step S203: and acquiring the overtime retry times, overtime failure times and calling time consumption in the calling data. The obtained calling data may not only include three types of data, i.e., the number of times of retry of the timeout, the number of times of failure of the timeout, and the time consumed for calling, but also may be acquired according to the user's requirement or use condition, for example, the number of times of success of the calling, the time of calling the interface, and the like.
Step S204: and judging whether the sum of the timeout retry number and the timeout failure number is larger than a first threshold value.
Step S205: if so, the first timeout time is increased by 200 milliseconds. And then, replacing the first timeout time of the original configuration center with the updated first timeout time.
Step S206: and if not, calculating a first expected value and a first standard deviation according to the acquired calling time consumption.
Step S207: and judging whether the first expected value and the first standard deviation are smaller than the second expected value and the second standard deviation at the same time.
Step S208: if yes, the sum of the first expected value and 2 times of the first standard deviation is used as the timeout adjusting value.
Step S209: the timeout time adjustment value is taken as the new first timeout time. And then replacing the first timeout time of the original configuration center with the updated first timeout time.
The present application further provides an apparatus for adjusting interface call timeout, the apparatus comprising a memory for storing computer program instructions and a processor for executing the computer program instructions, wherein the computer program instructions, when executed by the processor, trigger the apparatus to perform any of the methods or embodiments described above.
A computer readable medium having stored thereon computer program instructions executable by a processor to implement any of the methods or embodiments described above.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.
It should be noted that the present application may be implemented in software and/or a combination of software and hardware, for example, implemented using Application Specific Integrated Circuits (ASICs), general purpose computers or any other similar hardware devices. In one embodiment, the software programs of the present application may be executed by a processor to implement the steps or functions described above. Likewise, the software programs (including associated data structures) of the present application may be stored in a computer readable recording medium, such as RAM memory, magnetic or optical drive or diskette and the like. Additionally, some of the steps or functions of the present application may be implemented in hardware, for example, as circuitry that cooperates with the processor to perform various steps or functions.
In addition, some of the present application may be implemented as a computer program product, such as computer program instructions, which when executed by a computer, may invoke or provide methods and/or techniques in accordance with the present application through the operation of the computer. Program instructions which invoke the methods of the present application may be stored on a fixed or removable recording medium and/or transmitted via a data stream on a broadcast or other signal bearing medium and/or stored in a working memory of a computer device operating in accordance with the program instructions. An embodiment according to the present application comprises an apparatus comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein the computer program instructions, when executed by the processor, trigger the apparatus to perform a method and/or a solution according to the aforementioned embodiments of the present application.
It will be evident to those skilled in the art that the present application is not limited to the details of the foregoing illustrative embodiments, and that the present application may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the apparatus claims may also be implemented by one unit or means in software or hardware. The terms first, second, etc. are used to denote names, but not any particular order.

Claims (10)

1. A method for adjusting interface call timeout time, comprising:
acquiring a first timeout time of an interface;
operating the interface within a first time range based on the first timeout;
acquiring calling data of the interface in a first time length range, wherein the calling data comprises overtime retry times caused by overtime, overtime failure times caused by overtime and calling time consumption;
judging whether the sum of the overtime retry times and the overtime failure times is larger than a first threshold value;
if the first timeout time is greater than the first threshold, increasing a first timeout time; if not, the first timeout time is reduced.
2. The method of claim 1, wherein increasing the first timeout period comprises:
the first timeout time is increased by 200 milliseconds.
3. The method of claim 1, wherein reducing the first timeout period comprises:
and reducing the first timeout time according to the calling time consumption in the calling data.
4. The method of claim 3, wherein reducing the first timeout period according to the call elapsed time in the call data comprises:
calculating a first expected value of the calling time and a first standard deviation of the calling time by using normal distribution according to the calling time in the calling data;
and reducing the first timeout time according to the first expected value of the calling consumed time and the first standard deviation of the calling consumed time.
5. The method of claim 4, wherein reducing the first timeout period according to the first expected value of the call elapsed time and the first standard deviation of the call elapsed time comprises:
comparing the first expected value and/or the first standard deviation with a second expected value and/or a second standard deviation respectively, wherein the second expected value is an expected value obtained by calculating the calling time consumption in the calling data acquired when the interface is adjusted to call the timeout time last time, and the second standard deviation is a standard deviation obtained by calculating the calling time consumption in the calling data acquired when the interface is adjusted to call the timeout time last time;
and if the first expected value is smaller than a second expected value and/or the first standard deviation is smaller than a second standard deviation, reducing the first timeout time according to the first expected value of the call consumed time and the first standard deviation of the call consumed time.
6. The method of claim 4, wherein reducing the first timeout period according to the first expected value of the call elapsed time and the first standard deviation of the call elapsed time comprises:
adding the first expected value of the calling time consumption and the first standard deviation of the calling time consumption which is N times to obtain an overtime time adjustment value, wherein N is a positive integer;
setting the timeout adjustment value to a first timeout.
7. The method of claim 6, wherein adding the first expected value of the call time to the first standard deviation of N times the call time to obtain the timeout adjustment value comprises:
and adding the first expected value of the calling time consumption and the first standard deviation of 2 times of the calling time consumption to obtain an overtime time adjustment value.
8. The method of claim 6 or 7, wherein setting the timeout adjustment value to a first timeout comprises:
comparing the timeout adjustment value to the first timeout;
and if the timeout time adjustment value is smaller than the first timeout time, setting the timeout time adjustment value as the first timeout time.
9. An apparatus for adjusting interface call timeout, the apparatus comprising a memory for storing computer program instructions and a processor for executing the computer program instructions, wherein the computer program instructions, when executed by the processor, trigger the apparatus to perform the method of any of claims 1 to 8.
10. A computer readable medium having stored thereon computer program instructions executable by a processor to implement the method of any one of claims 1 to 8.
CN202210053213.5A 2022-01-18 2022-01-18 Method, equipment and medium for adjusting interface calling timeout time Pending CN114546611A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210053213.5A CN114546611A (en) 2022-01-18 2022-01-18 Method, equipment and medium for adjusting interface calling timeout time

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210053213.5A CN114546611A (en) 2022-01-18 2022-01-18 Method, equipment and medium for adjusting interface calling timeout time

Publications (1)

Publication Number Publication Date
CN114546611A true CN114546611A (en) 2022-05-27

Family

ID=81670911

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210053213.5A Pending CN114546611A (en) 2022-01-18 2022-01-18 Method, equipment and medium for adjusting interface calling timeout time

Country Status (1)

Country Link
CN (1) CN114546611A (en)

Similar Documents

Publication Publication Date Title
CN112346829B (en) Method and equipment for task scheduling
CN108737132B (en) Alarm information processing method and device
CN111383031B (en) Intelligent contract execution method and system in block chain and electronic equipment
CN110930291B (en) GPU video memory management control method and related device
CN108874324B (en) Access request processing method, device, equipment and readable storage medium
US20110282884A1 (en) Method and Device for Recording Media
CN111611020A (en) Application process searching and killing method and device for application program
US20110055164A1 (en) Method and system for maintaining data recoverability
CN111552618B (en) Method and equipment for collecting logs
CN112887761A (en) Video playing method, device, server and storage medium
CN114546611A (en) Method, equipment and medium for adjusting interface calling timeout time
CN109284275B (en) Cloud platform virtual machine file system monitoring method and device
CN108469934B (en) Page turning method and equipment
CN112819788B (en) Image stability detection method and device
CN107154960B (en) Method and apparatus for determining service availability information for distributed storage systems
CN115470059A (en) Disk detection method, device, equipment and storage medium
CN115657952A (en) Method, device and medium for adjusting data reconstruction speed according to slow request
CN115858483A (en) Log analysis and management method, terminal and computer readable storage medium
CN113438250A (en) Abnormal event processing method and equipment
US11463493B2 (en) Method and apparatus for playing media file
CN112965664A (en) Data compression method and related device
CN112765129A (en) Method and equipment for realizing database data version management
CN114885404B (en) Method and equipment for reducing communication power consumption of smart watch
CN111524059A (en) Memory utilization method, system, terminal and storage medium during image caching
CN114510495B (en) Database service data consistency processing method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination