Tag Archives: performance optimization

[Solved] prometheus Startup Error: opening storage failed

Modify prometheus.yml file and failed to start:

1. Configuring prometheus + node_exporter monitoring, the solution to the failure to start after modifying the prometheus.yml file.
2. Error message 1: err=”opening storage failed: lock DB directory: resource temporarily unavailable”

Solution: Check whether the current directory has generated files plus data/lock, need to delete the lock file: rm -rf lock
Delete and restart again

error message 2:err= “error starting web server: listen TCP 0.0.0:9090: bind: address ready in use”
installation command: yum install lsof -y
view command: lsof -i:9090
end command: kill -9 2878
restart command: ./prometheus
restart succeeded after operation

 

Client Error: Could not get a resource from the pool [How to Solve]

Client error: could not get a resource from the pool

1. Reason & Solution

Concurrency is indeed too high, and the link pool configuration parameters are unreasonable. Solution: adjust the configuration parameters; The execution queue of the capacity expansion node redis is occupied by a large number of operations or time-consuming operations. Solution: optimize slow operations; Slow operation is prohibited. There is a hot key solution: split the key and distribute the pressure to each redis node; Increase the local memory. First check the local memory, and then go to a node in redis. The link pool is exhausted. Solution: solve the problem of data skew, execute time-consuming commands, resulting in Ping timeout. Solution: disable time-consuming commands, such as: keys *; Optimize the time-consuming operation. There is a bug in the lower version of jedis package. Solution: upgrade the jedis version

2. Hot key scene sorting

Question 01:

Frequent IP access in a region

Solution:

Increase the application local cache and LRU maintain a certain number of hot IP addresses

Question 02:

Frequently query a large Zset set

Solution:

Split by business dimension; Split by data number segment

3. Sort out the scenario when a node’s link pool is exhausted

Homicide caused by hashtag abuse