There are currently 5 posts.
Font size: Small - 100% (Default)  Content converter: No conversion
 
Clicks Replies
1910 4
Cannot connect to MySQL的问题看起来已经解决了
巨大八爪鱼
武林盟主 二十一级
Reply
Floor 1 Posted at: 10/9/24 12:30
当时(8月19日)的修改方法是:
在/etc/my.cnf.d文件夹下新建一个max_connections.cnf文件(文件名随意),内容如下。
[mysqld]
max_connections = 2000
巨大八爪鱼
武林盟主 二十一级
Reply
Floor 2 Posted at: 10/9/24 12:32
系统的默认最大连接数很小,很快就用完了,所以就会报这样的错误。
圆环之理
上位魔导师 二十一级
Reply
Floor 3 Posted at: 10/9/24 12:37
原来如彼,辛苦了
 
巨大八爪鱼: 目前在解决502 bad gateway的问题。这是另外一个问题。
  10/9/24 12:59 Reply
巨大八爪鱼
武林盟主 二十一级
Reply
Floor 4 Posted at: 3/20/26 15:40

PostgreSQL数据库默认的最大连接数是100(SHOW max_connections;)。

修改/var/lib/pgsql/data/postgresql.conf文件,将第65行的max_connection = 100改成2000,然后sudo systemctl restart postgresql重启数据库,就可以提高最大连接数到2000。

Reply the post
Content:
User: You are currently anonymous.
Captcha:
Unclear? Try another one.
(Shortcut key: Ctrl+Enter)
Post Information
Clicks: 1910 Replies: 4
Author: 巨大八爪鱼
Last reply: 巨大八爪鱼
Last reply time: 3/20/26 15:40
Good area: 已处理区
Bar Hot Posts
Bar Good Posts
Announcements