Home > Backend Development > PHP Tutorial > mysql - PHP提示PDO failed

mysql - PHP提示PDO failed

WBOY
Release: 2016-06-06 20:35:45
Original
1058 people have browsed it

有一台MySQL服务器,每天上面都会新增数十个新数据库(三十 or 四十),截止到现在,已经有接近三千个数据库。单个数据库的访问量不大,但可能由于数量过多,最近经常性出现 PDO failed (Discuz的DB模块)错误。查看mysql错误日志又没发现什么有用提示。

想问问,出现类似这样的问题,应该从哪些方面考虑找原因?

下面列出的是部分 my.cnf 内容

<code>key_buffer_size = 32M
max_allowed_packet = 2M
table_open_cache = 256
sort_buffer_size = 6M
net_buffer_length = 8K
read_buffer_size = 2M
read_rnd_buffer_size = 2M
myisam_sort_buffer_size = 4M
myisam_max_sort_file_size = 32M
myisam_max_extra_sort_file_size = 32M
query_cache_size = 128M
thread_cache_size = 128
max_connections=256
tmp_table_size = 100M
join_buffer_size = 8M
</code>
Copy after login
Copy after login

回复内容:

有一台MySQL服务器,每天上面都会新增数十个新数据库(三十 or 四十),截止到现在,已经有接近三千个数据库。单个数据库的访问量不大,但可能由于数量过多,最近经常性出现 PDO failed (Discuz的DB模块)错误。查看mysql错误日志又没发现什么有用提示。

想问问,出现类似这样的问题,应该从哪些方面考虑找原因?

下面列出的是部分 my.cnf 内容

<code>key_buffer_size = 32M
max_allowed_packet = 2M
table_open_cache = 256
sort_buffer_size = 6M
net_buffer_length = 8K
read_buffer_size = 2M
read_rnd_buffer_size = 2M
myisam_sort_buffer_size = 4M
myisam_max_sort_file_size = 32M
myisam_max_extra_sort_file_size = 32M
query_cache_size = 128M
thread_cache_size = 128
max_connections=256
tmp_table_size = 100M
join_buffer_size = 8M
</code>
Copy after login
Copy after login

数据库索引改成innodb的?
不过三千个数据库,各种size才几兆几十兆,似乎配置太低了

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template