Home > database >  Request from twenty thousand to fifty thousand beats per minute interface, a link is not on the data
Request from twenty thousand to fifty thousand beats per minute interface, a link is not on the data

Time:09-26

Due to the interface need real-time data, cannot use the cache, now should be more user groups, request interface of twenty thousand to forty thousand beats per minute, appear on the program links don't database,
A database in mysql 5.7.
PHP 5.6
Core CPU server configuration 100 m bandwidth, 16, 32 gb of memory and bandwidth for about 70 m or so, there is no full, CPU and memory is far from work,
But in this database under the condition of high concurrency, occasionally appear links don't, in a few seconds, MYSQL under the great god give advice or comments, please.

CodePudding user response:

One is the maximum number of connections set a bit bigger, the other one is the client use the connection pool

CodePudding user response:

The connect show status like '% %'; Look at the number of connections,
If not the link problem, at the time of peak to see if the I/O wait

CodePudding user response:

reference 1st floor ZJCXC response:
set a maximum number of connections is bigger, the other is the client use the connection pool
maximum number of connections set is very large, 100000 such set directly, no more than the number of connections

CodePudding user response:

Mark the , I also don't understand

CodePudding user response:

What procedures, concurrent connections so big?

CodePudding user response:

Procedures, database is a database connection of link already occupied, this is for sure, you set the number of connections of again big, also appeared the situation, can only say that before you request while afterward, but the program is connected to the database, should be like this

CodePudding user response:

refer to 6th floor luyaran response:
program, database is a database connection of link already occupied, this is for sure, you set the number of connections of again big, also appeared the situation, can only say that your previous request, although afterward, but the program is connected to the database, should be so

I tried to connect the biggest number changed to 100000, the maximum number of connections, the maximum is twenty thousand,

CodePudding user response:

CSDN MYSQL the great god, I reduce the bandwidth consumption to 10 m or so, but still card, if is the link, not tools are connected not only on the database, CPU and memory, are not very high

CodePudding user response:

CPU and memory consumption figure, in addition, the code only consumes about 10 m, room feedback, basically walked Intranet, I modified the Linux kernel, open the file number is also modified to 30000, but still get stuck, there will be links database, don't know where is the problem, seek the great spirit came to help me analysis analysis,

CodePudding user response:

How to set up the connection pool is the client?

CodePudding user response:

The
references to the tenth floor yenange response:
how to set up the connection pool is the client?
PHP program, I also don't know how to set up,

CodePudding user response:

In addition, I want to ask next everybody the great god, read and write operations, using MyISAM would be better?

CodePudding user response:

Should be written work do you do before connection, these connections have released, if not release will take up the connection, it won't be long before it will fill the connection error

CodePudding user response:

Should be made a websocket buffer
  • Related