CN108549592A - A kind of monitoring method and monitoring device, application server of database connection pool - Google Patents

A kind of monitoring method and monitoring device, application server of database connection pool Download PDF

Info

Publication number
CN108549592A
CN108549592A CN201810223865.2A CN201810223865A CN108549592A CN 108549592 A CN108549592 A CN 108549592A CN 201810223865 A CN201810223865 A CN 201810223865A CN 108549592 A CN108549592 A CN 108549592A
Authority
CN
China
Prior art keywords
application server
database
connection
monitoring device
period
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
CN201810223865.2A
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.)
UNION MOBILE PAY ELECTRONIC COMMERCE Co Ltd
Original Assignee
UNION MOBILE PAY ELECTRONIC COMMERCE Co Ltd
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 UNION MOBILE PAY ELECTRONIC COMMERCE Co Ltd filed Critical UNION MOBILE PAY ELECTRONIC COMMERCE Co Ltd
Priority to CN201810223865.2A priority Critical patent/CN108549592A/en
Publication of CN108549592A publication Critical patent/CN108549592A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3055Monitoring arrangements for monitoring the status of the computing system or of the computing system component, e.g. monitoring if the computing system is on, off, available, not available

Abstract

The invention discloses a kind of monitoring method of database connection pool and monitoring device, application servers.The method includes:Monitoring device receives the stand-by period that application server obtains connection in first time period from the number for obtaining connection in database connection pool and/or every time from database connection pool, and determine the need for sending instruction information according to the stand-by period of connection is obtained from database connection pool from the number for obtaining connection in database connection pool and/or every time, so that application server increases the maximum number of connections between application server and database after receiving instruction information.Using this scheme, the stand-by period for obtaining connection between application server and database can be shortened, improve the efficiency for obtaining connection, effectively avoid the stand-by period longer problem for obtaining connection between the application server and database that occur when transaction peak period.

Description

A kind of monitoring method and monitoring device, application server of database connection pool
Technical field
The present invention relates to the monitoring method and monitoring device of field of communication technology more particularly to a kind of database connection pool, Application server.
Background technology
With the development of Internet service, the portfolio exponential increase of application server.Often occur in internet Focus incident, such as advertising campaign etc. are easy to cause portfolio in certain time period and increase sharply, peak traffic occur.
However, the maximum number of connections between application server and database is pre-set in the prior art, therefore, Once there is a situation where peak of merchandising, application server cannot obtain connection from database connection pool in time, cause using clothes The stand-by period that business device obtains connection from database connection pool is longer.For example, if application server needed in same a period of time Quarter 11 with Database connect, and the maximum number of connections amount between the application server and database is 10, then applies Server needs that the 11st connection could be obtained after waiting for any one in remaining 10 connection currently in use, that is, It says, for the 11st connection, this, which is connected to, needs certain stand-by period when acquisition.
Based on this, there is an urgent need for a kind of monitoring methods of database connection pool at present, for solving peak of merchandising in the prior art When, application server obtains the stand-by period longer problem of connection from database connection pool.
Invention content
The embodiment of the present invention provides a kind of monitoring method and monitoring device, application server of database connection pool, with solution Certainly in the prior art merchandise peak when, application server obtains the stand-by period longer technology of connection from database connection pool Problem.
The embodiment of the present invention provides a kind of monitoring method of database connection pool, the method includes:
Monitoring device receives the link information that application server is sent;The link information includes that the application server exists In first time period from the number and/or the application server for obtaining connection in database connection pool in first time period with The database obtains the stand-by period of connection from database connection pool every time;
The monitoring device is according to the link information, it is determined whether sends instruction information, institute to the application server It states and indicates that information is used to indicate the maximum that the application server increases between the application server and the database and connects Number.
Optionally, the monitoring device is according to the link information, it is determined whether sends and indicates to the application server Information, including:
The monitoring device is obtained from database connection pool in first time period according to the application server and is connected Number and the application server in first time period with database every time from database connection pool obtain connection etc. It waits for the time, obtains the application server and obtain connection from database connection pool every time with database in first time period Average latency;
The monitoring device if it is determined that the average latency be greater than or equal to predetermined threshold value, then to the application service Device sends instruction information.
The embodiment of the present invention provides a kind of monitoring method of database connection pool, the method includes:
Application server obtain link information, the link information include the application server in first time period from Number and/or the application server that connection is obtained in database connection pool are each with the database in first time period The stand-by period of connection is obtained from database connection pool;
The application server sends the link information to monitoring device, and the link information is used for the monitoring device Determine whether that the application server sends instruction information according to the link information, the instruction information is used to indicate described Application server increases the maximum number of connections between the application server and the database.
Optionally, the method further includes:
The application server receives the instruction information that the monitoring device is sent;
The application server increases between the application server and the database most according to the instruction information Big connection number.
Optionally, the first time period is greater than or equal to predetermined time period.
The embodiment of the present invention provides a kind of monitoring device, and the monitoring device includes:
Receiving unit, the link information for receiving application server transmission;The link information includes the application clothes Business device obtained from database connection pool in first time period connection number and/or the application server at the first time The stand-by period connecting is obtained from database connection pool every time with the database in section;
Processing unit, for according to the link information, it is determined whether send instruction information, institute to the application server It states and indicates that information is used to indicate the maximum that the application server increases between the application server and the database and connects Number.
Optionally, the processing unit is specifically used for:
Obtain the number of connection and described from database connection pool in first time period according to the application server Application server obtains the stand-by period connecting from database connection pool every time in first time period with database, obtains institute It states application server and obtains the average latency connecting from database connection pool every time with database in first time period;
If it is determined that the average latency is greater than or equal to predetermined threshold value, then instruction letter is sent to the application server Breath.
The embodiment of the present invention provides a kind of application server, and the application server includes:
Take-up unit, for obtaining link information, the link information includes the application server in first time period It is interior from the number for obtaining connection in database connection pool and/or the application server in first time period with the database The stand-by period of connection is obtained from database connection pool every time;
Transmission unit, for sending the link information to monitoring device, the link information is used for the monitoring device Determine whether that the application server sends instruction information according to the link information, the instruction information is used to indicate described Application server increases the maximum number of connections between the application server and the database.
Optionally, the take-up unit is additionally operable to:
Receive the instruction information that the monitoring device is sent;
The application server further includes:
Processing unit, for increasing the maximum between the application server and the database according to the instruction information Connect number.
Optionally, the first time period is greater than or equal to predetermined time period.
In the embodiment of the present invention, monitoring device receives application server and is obtained from database connection pool in first time period It takes the number of connection and/or obtains the stand-by period of connection from database connection pool every time, and according to from database connection pool It is middle to obtain the number connected and/or obtain the stand-by period of connection from database connection pool every time to determine the need for sending Information is indicated, so that application server increases the most Dalian between application server and database after receiving instruction information Connect number.In this way, monitoring device obtains the number of connection according to application server in first time period from database connection pool And/or obtained from database connection pool every time connection stand-by period can decide whether occur obtain connection stand-by period Longer situation, and then determine whether to send instruction information, instruction information is used to indicate application server and increases the application clothes The maximum number of connections being engaged between device and the database;Using this scheme, instruction application in time takes monitoring device as needed The maximum number of connections being engaged between device increase application server and database, so as to shorten between application server and database Obtain the stand-by period of connection, improve the efficiency for obtaining connection, when effectively avoiding transaction peak period the application server that occurs with The stand-by period longer problem of connection is obtained between database.
Description of the drawings
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly introduced, it should be apparent that, drawings in the following description are only some embodiments of the invention, for this For the those of ordinary skill in field, without having to pay creative labor, it can also be obtained according to these attached drawings His attached drawing.
Fig. 1 is a kind of system architecture schematic diagram that the embodiment of the present invention is applicable in;
Fig. 2 is the flow diagram corresponding to a kind of monitoring method of database connection pool provided in an embodiment of the present invention;
Fig. 3 provides a kind of structural schematic diagram of monitoring device for the embodiment of the present invention;
Fig. 4 provides a kind of structural schematic diagram of application server for the embodiment of the present invention.
Specific implementation mode
To make the objectives, technical solutions, and advantages of the present invention clearer, below in conjunction with attached drawing to the present invention make into It is described in detail to one step, it is clear that the described embodiments are only some of the embodiments of the present invention, rather than whole implementation Example.Based on the embodiments of the present invention, those of ordinary skill in the art are obtained under the premise of not making creative labor All other embodiment, shall fall within the protection scope of the present invention.
Fig. 1 illustrates a kind of applicable system architecture schematic diagram of the embodiment of the present invention, as shown in Figure 1, of the invention The applicable system architecture 100 of embodiment includes monitoring device 101, database 102, multiple application servers, such as shown in Fig. 1 Application server 1031, application server 1032, the application server 1033 gone out.
Schematic diagram according to figure 1, monitoring device can be taken by any application in network and multiple application servers Business device is communicated, to realize that the database connection pool between the application server and database is monitored, for example, to answer For server 1031, monitoring device can obtain the link information between application server 1031 and database, Jin Ergen The maximum number of connections that adjustment application server and database is determined the need for according to link information, that is, realize to database connection pool Monitoring.
Multiple application servers can access database 102, further, by taking application server 1031 as an example, application The needs of server 1031 establish a connection with database 102, and this connection relation can be by application server 1031 from number It is established according to the mode of connection is obtained in the connection pool of library, and then application server 1031 can be accessed according to the connection got Database 102.
Based on system architecture shown in FIG. 1, Fig. 2 is a kind of monitoring side of database connection pool provided in an embodiment of the present invention Flow diagram corresponding to method, as shown in Fig. 2, specifically comprising the following steps:
Step 201, application server obtains link information.
Step 202, application server sends the link information to monitoring device.
Step 203, monitoring device receives the link information that application server is sent.
Step 204, monitoring device is according to the link information, it is determined whether sends instruction letter to the application server Breath.
Step 205, application server receives the instruction information that monitoring device is sent;
Step 206, application server increases the maximum number of connections between application server and database according to instruction information.
In this way, monitoring device obtains time of connection according to application server in first time period from database connection pool When number and/or the stand-by period for obtaining connection from database connection pool every time can decide whether to occur obtaining the waiting of connection Between longer situation, and then determine whether to send instruction information, instruction information is used to indicate application server and increases the application Maximum number of connections between server and the database;Using this scheme, monitoring device instruction application in time as needed Server increases the maximum number of connections between application server and database, so as to shorten application server and database it Between obtain stand-by period of connection, improve the efficiency for obtaining connection, effectively avoid the application server occurred when transaction peak period The stand-by period connecting longer problem is obtained between database.
In the embodiment of the present invention, link information may include much information, exist for example, link information includes application server The number of connection is obtained in first time period from database connection pool;Alternatively, link information includes application server first The stand-by period connecting is obtained from database connection pool every time with database in period;Or link information includes answering Obtained from database connection pool in first time period with server connection number and application server in first time period It is interior to obtain the stand-by period connecting from database connection pool every time with database.Wherein, first time period can be this field Technical staff with actual conditions setting, does not limit specifically rule of thumb.
Further, it is contemplated that application server with from database connection pool obtain connection during, in fact it could happen that A period of time in due to the number of transmissions (Transaction Per Second, TPS) per second it is excessively high caused by obtain connection Stand-by period longer situation.Influence in order to avoid this case to the stand-by period of acquisition connection, first time period can To be set greater than or be equal to predetermined time period.Wherein, predetermined time period can be determined according to the duration of TPS, Can also predetermined time period rule of thumb be arranged with actual conditions in those skilled in the art, do not limit specifically.
Connection is obtained from database connection pool in first time period in order to clearly describe application server It number and the stand-by period for obtaining connection from database connection pool every time, will be described below by example.
System architecture schematic diagram as schematically shown in Figure 1 creates opening when connecting to reduce application server with database Pin, application server 1031 are generally established a connection by the way of database connection pool with database 102.That is, Application server 1031 needs before executing structured query language (Structured Query Language, SQL) sentence Database connection is first taken out from database connection pool, then established a connection with database 102 and executed SQL statement, After terminating to execute SQL statement, database connection is put back to database connection pool by application server 1031.
In process described above, application server takes out data in first time period from database connection pool The library connection required stand-by period can be used as application server to connect every time from database with database in first time period Connect the stand-by period that connection is obtained in pond.As shown in table 1, it is a kind of example of link information in first time period.Shown according to table 1 For the content gone out it is found that first time period is set as 5s, application server obtains time of connection in 5s from database connection pool Number is 10 times, wherein it is more than 0s to have 3 stand-by period for obtaining connection, respectively:3rd waiting that connection is obtained with the 5th Time is 1s, and the 7th stand-by period for obtaining connection is 2s;Remaining the 7 times stand-by period for obtaining connection are 0s.
Table 1:A kind of example of link information in first time period
It should be noted that table 1 is only a kind of example, in other possible realization methods, link information can be wrapped only The number for obtaining connection from database connection pool is included, or can also only include obtaining connection from database connection pool every time Stand-by period, do not limit specifically.
Based on content as described above, the embodiment of the present invention provide a kind of acquisitions application server and database every time from The example of the code of the stand-by period of connection is obtained in database connection pool, can specifically be obtained in the following way:
Long startTime=System.currentTimeMillis ();/ obtain database connection sart point in time
Connection connection=dataSource.getConnection ();
Long endTime=System.currentTimeMillis ();/ obtain database connection deadline point
Long getConnTookTime=endTime-startTime;/ obtain the stand-by period that database connects
It should be noted that meaning illustrated above is only when obtaining to obtain the waiting of connection from database connection pool every time Between code a kind of possible example, in other possible embodiments, those skilled in the art can also be rule of thumb It modifies to the code of meaning illustrated above with actual conditions, does not limit specifically.
In step 204, instruction information is used to indicate the maximum between application server increase application server and database Connect number (MaxActive).For application server in database connection pool in a manner of obtain connection, application server with Maximum number of connections between database can be the maximum number of connections of database connection pool.
Further, monitoring device determines whether that application server is sent there are many modes for indicating information, Yi Zhongke Can realization method be, monitoring device can according to application server in first time period from database connection pool obtain connect The number and application server that connect obtain the waiting connecting from database connection pool every time in first time period with database Time determines whether that application server sends instruction information.
Specifically, monitoring device obtains connection in first time period according to application server from database connection pool Number and application server obtain the stand-by period connecting from database connection pool every time in first time period with database, When the server that is applied obtains the average waiting connecting from database connection pool every time in first time period with database Between;Further, monitoring device if it is determined that the average latency be greater than or equal to predetermined threshold value, then to application server send out Send instruction information.
Based on content as described above, the average latency can obtain in the following manner:
Wherein, TPR (Time per request) be application server in first time period with database every time from number According to the average latency for obtaining connection in the connection pool of library;TWT (The total wait time) is application server first The cumulative latency of connection is obtained in period from database connection pool;TNR(The total number of Requests the number of connection) is obtained from database connection pool in first time period for application server.
According to content as described above, the embodiment of the present invention provides a kind of showing for code calculating the average latency Example, can specifically calculate in the following way:
It should be noted that the code of the calculating average latency of meaning illustrated above is only a kind of example, this field skill Art personnel can also rule of thumb modify to the code of meaning illustrated above with actual conditions, not limit specifically.
Alternatively possible realization method is, monitoring device can according to application server in first time period from data The number of connection is obtained in the connection pool of library to determine whether that application server sends instruction information.
Specifically, monitoring device is if it is determined that application server obtains connection in first time period from database connection pool Number be more than first threshold, then to application server send instruction information.Wherein, first threshold can be according to first time period Time span determine, for example, when the time span of first time period is longer, first threshold can be increased, on the contrary, first When the time span of period is shorter, first threshold can be reduced.Alternatively, can also rule of thumb be determined with actual conditions One threshold value, does not limit specifically.
Alternatively possible realization method is, monitoring device can be according to application server in first time period and data Library obtains the stand-by period of connection to determine whether that application server sends instruction information from database connection pool every time.
Specifically, monitoring device according to application server in first time period with database every time from database connection pool The middle stand-by period for obtaining connection determines that application server obtains connection in first time period and from database connection pool Cumulative latency, and after determining that the cumulative latency is more than second threshold, instruction information is sent to application server. Wherein, second threshold can be that those skilled in the art rule of thumb determine with actual conditions, not limit specifically
In step 206, application server increase the maximum number of connections between application server and database mode have it is more Kind, those skilled in the art can rule of thumb determine the mode for increasing maximum number of connections with actual conditions, not limit specifically.
The embodiment of the present invention provides a kind of example for the code increasing maximum number of connections, specific as follows:
public void reSetMaxPoolSize(int maxPoolSize){
// reset database connection pool size
ComboPooledDataSource poolDataSource=getPoolDataSource ();
poolDataSource.setMaxPoolSize(maxPoolSize);
// reload parameter and come into force
poolDataSource.reload();
}
It should be noted that the code of the increase maximum number of connections of meaning illustrated above is only a kind of example, art technology Personnel can also rule of thumb modify to the code of meaning illustrated above with actual conditions, not limit specifically.
Based on same inventive concept, Fig. 3 illustrates the embodiment of the present invention and provides a kind of structure of monitoring device Schematic diagram, as shown in figure 3, the monitoring device 300 includes receiving unit 301, processing unit 302;Wherein,
Receiving unit 301, the link information for receiving application server transmission;The link information includes the application Server obtained from database connection pool in first time period connection number and/or the application server at first Between the stand-by period connecting is obtained from database connection pool every time with the database in section;
Processing unit 302, for according to the link information, it is determined whether send instruction letter to the application server Breath, the instruction information are used to indicate the application server and increase maximum between the application server and the database Connect number.
Optionally, the processing unit 302 is specifically used for:
Obtain the number of connection and described from database connection pool in first time period according to the application server Application server obtains the stand-by period connecting from database connection pool every time in first time period with database, obtains institute It states application server and obtains the average latency connecting from database connection pool every time with database in first time period;
If it is determined that the average latency is greater than or equal to predetermined threshold value, then instruction letter is sent to the application server Breath.
Based on same inventive concept, Fig. 4 illustrates the embodiment of the present invention and provides a kind of knot of application server Structure schematic diagram, as shown in figure 4, the application server 400 includes take-up unit 401, transmission unit 402, processing unit 403; Wherein,
Take-up unit 401, for obtaining link information, the link information includes the application server at the first time Section in obtained from database connection pool connection number and/or the application server first time 4,
Transmission unit 402, for sending the link information to monitoring device, the link information is set for the monitoring Standby to determine whether that the application server sends instruction information according to the link information, the instruction information is used to indicate institute It states application server and increases maximum number of connections between the application server and the database.
Optionally, the take-up unit 401 is additionally operable to:
Receive the instruction information that the monitoring device is sent;
The application server further includes:
Processing unit 403, for being increased between the application server and the database according to the instruction information Maximum number of connections.
Optionally, the first time period is greater than or equal to predetermined time period.
In the embodiment of the present invention, monitoring device receives application server and is obtained from database connection pool in first time period It takes the number of connection and/or obtains the stand-by period of connection from database connection pool every time, and according to from database connection pool It is middle to obtain the number connected and/or obtain the stand-by period of connection from database connection pool every time to determine the need for sending Information is indicated, so that application server increases the most Dalian between application server and database after receiving instruction information Connect number.In this way, monitoring device obtains the number of connection according to application server in first time period from database connection pool And/or obtained from database connection pool every time connection stand-by period can decide whether occur obtain connection stand-by period Longer situation, and then determine whether to send instruction information, instruction information is used to indicate application server and increases the application clothes The maximum number of connections being engaged between device and the database;Using this scheme, instruction application in time takes monitoring device as needed The maximum number of connections being engaged between device increase application server and database, so as to shorten between application server and database Obtain the stand-by period of connection, improve the efficiency for obtaining connection, when effectively avoiding transaction peak period the application server that occurs with The stand-by period longer problem of connection is obtained between database.
It should be understood by those skilled in the art that, the embodiment of the present invention can be provided as method, system or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention Apply the form of example.Moreover, the present invention can be used in one or more wherein include computer usable program code computer The computer program production implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) The form of product.
The present invention be with reference to according to the method for the embodiment of the present invention, the flow of equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that can be realized by computer program instructions every first-class in flowchart and/or the block diagram The combination of flow and/or box in journey and/or box and flowchart and/or the block diagram.These computer programs can be provided Instruct the processor of all-purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine so that the instruction executed by computer or the processor of other programmable data processing devices is generated for real The device for the function of being specified in present one flow of flow chart or one box of multiple flows and/or block diagram or multiple boxes.
These computer program instructions, which may also be stored in, can guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works so that instruction generation stored in the computer readable memory includes referring to Enable the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one box of block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device so that count Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, in computer or The instruction executed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one The step of function of being specified in a box or multiple boxes.
Although preferred embodiments of the present invention have been described, it is created once a person skilled in the art knows basic Property concept, then additional changes and modifications may be made to these embodiments.So it includes excellent that the following claims are intended to be interpreted as It selects embodiment and falls into all change and modification of the scope of the invention.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art God and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies Within, then the present invention is also intended to include these modifications and variations.

Claims (10)

1. a kind of monitoring method of database connection pool, which is characterized in that the method includes:
Monitoring device receives the link information that application server is sent;The link information includes the application server first In period from the number and/or the application server for obtaining connection in database connection pool in first time period with it is described Database obtains the stand-by period of connection from database connection pool every time;
The monitoring device is according to the link information, it is determined whether sends instruction information, the finger to the application server Show that information is used to indicate the application server and increases maximum number of connections between the application server and the database.
2. according to the method described in claim 1, it is characterized in that, the monitoring device is according to the link information, determination is It is no to send instruction information to the application server, including:
The monitoring device obtains time of connection according to the application server in first time period from database connection pool When number and the application server obtain the waiting connecting from database connection pool every time in first time period with database Between, it obtains the application server and obtains being averaged for connection from database connection pool every time with database in first time period Stand-by period;
The monitoring device if it is determined that the average latency be greater than or equal to predetermined threshold value, then to the application server send out Send instruction information.
3. a kind of monitoring method of database connection pool, which is characterized in that the method includes:
Application server obtain link information, the link information include the application server in first time period from data Obtained in the connection pool of library connection number and/or the application server in first time period with the database every time from number According to the stand-by period for obtaining connection in the connection pool of library;
The application server sends the link information to monitoring device, the link information for the monitoring device according to The link information determines whether that the application server sends instruction information, and the instruction information is used to indicate the application Server increases the maximum number of connections between the application server and the database.
4. according to the method described in claim 3, it is characterized in that, the method further includes:
The application server receives the instruction information that the monitoring device is sent;
The application server increases the most Dalian between the application server and the database according to the instruction information Connect number.
5. method according to claim 1 to 4, which is characterized in that the first time period is greater than or equal to Predetermined time period.
6. a kind of monitoring device, which is characterized in that the monitoring device includes:
Receiving unit, the link information for receiving application server transmission;The link information includes the application server In first time period from the number and/or the application server for obtaining connection in database connection pool in first time period The stand-by period connecting is obtained from database connection pool every time with the database;
Processing unit, for according to the link information, it is determined whether send instruction information, the finger to the application server Show that information is used to indicate the application server and increases maximum number of connections between the application server and the database.
7. monitoring device according to claim 6, which is characterized in that the processing unit is specifically used for:
Obtain the number of connection and the application from database connection pool in first time period according to the application server Server obtains the stand-by period connecting from database connection pool every time in first time period with database, obtains described answer The average latency connecting is obtained from database connection pool every time with database in first time period with server;
If it is determined that the average latency is greater than or equal to predetermined threshold value, then instruction information is sent to the application server.
8. a kind of application server, which is characterized in that the application server includes:
Take-up unit, for obtaining link information, the link information include the application server in first time period from Number and/or the application server that connection is obtained in database connection pool are each with the database in first time period The stand-by period of connection is obtained from database connection pool;
Transmission unit, for sending the link information to monitoring device, the link information for the monitoring device according to The link information determines whether that the application server sends instruction information, and the instruction information is used to indicate the application Server increases the maximum number of connections between the application server and the database.
9. application server according to claim 8, which is characterized in that the take-up unit is additionally operable to:
Receive the instruction information that the monitoring device is sent;
The application server further includes:
Processing unit, for increasing the maximum connection between the application server and the database according to the instruction information Number.
10. the monitoring device according to any one of claim 6 to 9 or application server, which is characterized in that described first Period is greater than or equal to predetermined time period.
CN201810223865.2A 2018-03-19 2018-03-19 A kind of monitoring method and monitoring device, application server of database connection pool Pending CN108549592A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810223865.2A CN108549592A (en) 2018-03-19 2018-03-19 A kind of monitoring method and monitoring device, application server of database connection pool

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810223865.2A CN108549592A (en) 2018-03-19 2018-03-19 A kind of monitoring method and monitoring device, application server of database connection pool

Publications (1)

Publication Number Publication Date
CN108549592A true CN108549592A (en) 2018-09-18

Family

ID=63516706

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810223865.2A Pending CN108549592A (en) 2018-03-19 2018-03-19 A kind of monitoring method and monitoring device, application server of database connection pool

Country Status (1)

Country Link
CN (1) CN108549592A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109977096A (en) * 2019-03-05 2019-07-05 中国银联股份有限公司 A kind of database connection management method and device
CN111324644A (en) * 2018-11-28 2020-06-23 中国移动通信集团浙江有限公司 Method and device for monitoring database connection storm under large-scale micro-service architecture
CN112115020A (en) * 2020-08-27 2020-12-22 北京基调网络股份有限公司 Database connection pool abnormity monitoring method and device and computer equipment
US20220121672A1 (en) * 2019-12-13 2022-04-21 Paypal, Inc. Self-Adjusting Connection Pool in a Distributed System
CN115328978A (en) * 2022-06-27 2022-11-11 光大环境科技(中国)有限公司 Connection method of connection pool and server

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102033784A (en) * 2010-11-18 2011-04-27 山东中创软件工程股份有限公司 Method and device for optimizing application server
US20150244774A1 (en) * 2014-02-27 2015-08-27 Tmaxsoft. Co., Ltd. Method and apparatus for managing connection using dummy http
CN106250500A (en) * 2016-07-29 2016-12-21 广州唯品会信息科技有限公司 The dynamic management approach of database connection pool and system
CN106909459A (en) * 2016-06-02 2017-06-30 阿里巴巴集团控股有限公司 A kind of method and device for adjusting connection pool
CN107463612A (en) * 2017-06-29 2017-12-12 北京北信源软件股份有限公司 High concurrent REDIS database operation methods and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102033784A (en) * 2010-11-18 2011-04-27 山东中创软件工程股份有限公司 Method and device for optimizing application server
US20150244774A1 (en) * 2014-02-27 2015-08-27 Tmaxsoft. Co., Ltd. Method and apparatus for managing connection using dummy http
CN106909459A (en) * 2016-06-02 2017-06-30 阿里巴巴集团控股有限公司 A kind of method and device for adjusting connection pool
CN106250500A (en) * 2016-07-29 2016-12-21 广州唯品会信息科技有限公司 The dynamic management approach of database connection pool and system
CN107463612A (en) * 2017-06-29 2017-12-12 北京北信源软件股份有限公司 High concurrent REDIS database operation methods and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陈文振: "数据库连接共享技术研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111324644A (en) * 2018-11-28 2020-06-23 中国移动通信集团浙江有限公司 Method and device for monitoring database connection storm under large-scale micro-service architecture
CN111324644B (en) * 2018-11-28 2023-10-27 中国移动通信集团浙江有限公司 Method and device for monitoring database connection storm under large-scale micro-service architecture
CN109977096A (en) * 2019-03-05 2019-07-05 中国银联股份有限公司 A kind of database connection management method and device
US20220121672A1 (en) * 2019-12-13 2022-04-21 Paypal, Inc. Self-Adjusting Connection Pool in a Distributed System
US11580130B2 (en) * 2019-12-13 2023-02-14 Paypal, Inc. Self-adjusting connection pool in a distributed system
CN112115020A (en) * 2020-08-27 2020-12-22 北京基调网络股份有限公司 Database connection pool abnormity monitoring method and device and computer equipment
CN112115020B (en) * 2020-08-27 2021-03-26 北京基调网络股份有限公司 Database connection pool abnormity monitoring method and device and computer equipment
CN115328978A (en) * 2022-06-27 2022-11-11 光大环境科技(中国)有限公司 Connection method of connection pool and server
CN115328978B (en) * 2022-06-27 2023-11-17 光大环境科技(中国)有限公司 Connection method of connection pool and server

Similar Documents

Publication Publication Date Title
CN108549592A (en) A kind of monitoring method and monitoring device, application server of database connection pool
US10783002B1 (en) Cost determination of a service call
CN104123184B (en) A kind of method and system for being used to distribute resource for the task in building process
CN106383764A (en) Data acquisition method and device
CN110060139B (en) Accounting processing method and device
CN109145051A (en) The data summarization method and device and electronic equipment of distributed data base
CN108111554A (en) A kind of control method and device of access queue
CN109783151A (en) The method and apparatus of rule change
CN107908481A (en) A kind of method of data synchronization, device and system
CN107403112A (en) Data verification method and its equipment
CN113190427A (en) Caton monitoring method and device, electronic equipment and storage medium
CN117009283A (en) Multi-core multi-chip data processing method, device, chip and storage medium
WO2018000622A1 (en) Wms system and erp system synchronization method and system
CN110532111A (en) High concurrent requests asynchronous processing method, device, computer equipment and storage medium
US20220391780A1 (en) Method of federated learning, electronic device, and storage medium
CN116257226A (en) Data verification method and device, electronic equipment and storage medium
EP4142258A1 (en) Edge computing network, data transmission method and apparatus, device and storage medium
CN115827265A (en) Transaction processing method, device, equipment and storage medium
CN114283007A (en) Method and device for solving payment hotspot account problem and electronic equipment
CN114090247A (en) Method, device, equipment and storage medium for processing data
CN114374703A (en) Method, device and equipment for acquiring cloud mobile phone information and storage medium
CN114168439A (en) Pressure measurement control method and device for service in cluster, storage medium and terminal
CN110807058B (en) Method and system for exporting data
CN114153427A (en) Optimization method and system of continuous integration assembly line
US10459937B2 (en) Effect of operations on application requests

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20180918

RJ01 Rejection of invention patent application after publication