gpt4 book ai didi

php - PDO异常 : SQLSTATE[HY000]: General error: 3 Error writing file '/tmp/MYHKgYpv' (Errcode: 28)

转载 作者:可可西里 更新时间:2023-11-01 08:04:49 26 4
gpt4 key购买 nike

我已经安装了Visitor模块 Drupal 7。我使用 www.domain.com/visitors 查看了报告。所有报告都运作良好。但是当我查看用户事件报告时,它显示以下错误。

PDOException: SQLSTATE[HY000]: General error: 3 Error writing file '/tmp/MYHKgYpv' (Errcode: 28): SELECT u.name AS name, u.uid AS uid, COUNT(DISTINCT v.visitors_id) AS hits, COUNT(DISTINCT n.nid) AS nodes, COUNT(DISTINCT c.cid) AS comments FROM {users} u LEFT OUTER JOIN {visitors} v ON u.uid=v.visitors_uid LEFT OUTER JOIN {node} n ON u.uid=n.uid LEFT OUTER JOIN {comment} c ON u.uid=c.uid WHERE (visitors_date_time BETWEEN :db_condition_placeholder_0 AND :db_condition_placeholder_1) GROUP BY u.name, u.uid, v.visitors_uid, n.uid, c.uid ORDER BY hits DESC LIMIT 10 OFFSET 0; Array ( [:db_condition_placeholder_0] => 1451606400 [:db_condition_placeholder_1] => 1452556799 ) in PagerDefault->execute() (line 79 of /home/legalmon/public_html/includes/pager.inc).

我该如何解决这个问题?

最佳答案

您应该在触发“USER REPORT 查询”时不断检查您的/tmp 文件夹大小。

如果/tmp 目录被 100% 使用,您将遇到此错误。

解决方案是将一些 GB 挂载到/tmp 目录或设置 MySQL tmp 的新位置。

设置新位置:

Create a directory anywhere you have enough space(can be the "/" root directory)

# mkdir /home/mysqltmp

Give write permissions

# chmod 1777 /home/mysqltmp

Open MY.CNF File

# /etc/my.cnf

Add below line under the [mysqld] section and save the file

# tmpdir=/home/mysqltmp

Restart MySQL

# /etc/init.d/mysql restart

Check new location

# mysqladmin var | grep tmpdir

This should show following return.

| slave_load_tmpdir | /home/mysqltmp
| tmpdir | /home/mysqltmp

完成!!

尝试刷新页面。

关于php - PDO异常 : SQLSTATE[HY000]: General error: 3 Error writing file '/tmp/MYHKgYpv' (Errcode: 28),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34763574/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com