The Postgres version of this tutorial case is 12
Problem Description:
psycopg2.OperationalError: FATAL: sorry, too many clients already on
In the morning, I found that the python back-end service I maintained reported an error. Baidu found that the default maximum concurrency of Postgres was only 100, which led to this problem
Modify tutorial:
cd /var/lib/postgresql/12/main
vi postgresql.auto.conf
Add the following line of code to the file to set the maximum number of connections to 800, the default is 100
max_connections = 800
Restart the service
service postgresql restart
The following is the SQL command to check whether the modification is successful:
# Show the maximum number of connections to the current database
show max_connections;
# Show the number of users currently connected to the data
SELECT COUNT(*) from pg_stat_activity;
# Show details of the current connection, very slow, don't use it
SELECT * FROM pg_stat_activity;
The effect is similar, which indicates that the setting is successful
Read More:
- [Solved] Python matplotlib Error: RuntimeError: In set_size: Could not set the fontsize…
- [Solved] RecursionError: maximum recursion depth exceeded in comparison
- [Solved] Np.argwhere error: maximum recursion depth exceeded while calling
- [Solved] Error: [email protected]: wrong number of arguments (given 1, expected 0)
- The range of Chinese Unicode encoding and the calculation of the number of Chinese and English words in text
- Python Kmeans Error: ConvergenceWarning: Number of distinct clusters (99) found smaller than n_clusters (100).
- PIP Install Caused by SSLError(SSLError(1, ‘[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1123)’))
- Facenet validate_on_lfw.py Error AssertionError: The number of LFW images must be an integer multip
- [Solved] urllib.error.URLError: <urlopen error [SSL: WRONG_VERSION_NUMBER] wrong version number
- Python: How to Set Line breaks and tabs for Strings
- Ubuntu22.04 OpenHarmony Execute hb set Error [How to Solve]
- [Solved] CUDA unknown error – this may be due to an incorrectly set up environment
- Mybatis Plus update time error: Could not set property ‘updateTime’
- Error in sitecustomize set PYTHONVERBOSE for traceback KeyError: ‘PYTHONPATH’
- AttributeError: can‘t set attribute [How to Solve]
- [Solved] pycharm Import New Project Error: cannot set up a python sdk
- [Solved] Windows10 Pycharm Use Virtual Environment Error: Cannot set up a python SDK
- To solve the problem that the loss of verification set of resnet50 pre-training model remains unchanged
- [Solved] error: the following arguments are required (Default parameters are set)
- pd.to_csv Error: need to escape, but no escapechar set