I have installed Visitor Module Drupal 7. I have viewed the reports using www.domain.com/visitors. All the reports are working well. But when i view the user activity report it shows below error.
我安装了访客模块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).
PDOException:SQLSTATE [HY000]:常规错误:3写入文件'/ tmp / MYHKgYpv'时出错(错误代码:28):SELECT u.name AS name,u.uid AS uid,COUNT(DISTINCT v.visitors_id)AS hits,COUNT (DISTINCT n.nid)AS节点,COUNT(DISTINCT c.cid)AS注释FROM {users} u LEFT OUTER JOIN {visitor} 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点击DESC LIMIT 10 OFFSET 0; PagerDefault-> execute()中的数组([:db_condition_placeholder_0] => 1451606400 [:db_condition_placeholder_1] => 1452556799)(/home/legalmon/public_html/includes/pager.inc第79行)。
How can i fix this issue?
我该如何解决这个问题?
2 个解决方案
#1
1
You should continuously check your /tmp folder size while triggering "USER REPORT Query".
您应该在触发“USER REPORT Query”时连续检查/ tmp文件夹大小。
If /tmp directory is 100% utilized you would experience this error.
如果/ tmp目录是100%使用,您将遇到此错误。
Solution is to mount some GB's to /tmp directory or set new location of MySQL tmp.
解决方法是将一些GB安装到/ tmp目录或设置MySQL tmp的新位置。
To setting up New location:
要设置新位置:
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
打开MY.CNF文件
/etc/my.cnf
Add below line under the [mysqld] section and save the file
在[mysqld]部分下面添加以下行并保存文件
tmpdir=/home/mysqltmp
Restart MySQL
重启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
| slave_load_tmpdir | / home / mysqltmp | tmpdir | /家/ mysqltmp
Done !!
完成!!
Try refresh the Page.
尝试刷新页面。
#2
0
First, check with df -h
if the storage device is nearly full, if that's the case, then you need to free up some space.
首先,使用df -h检查存储设备是否已满,如果是这种情况,则需要释放一些空间。
Deleting old databases may be solution, but if you don't see a change in free space after the purge, then you need to do the following:
删除旧数据库可能是解决方案,但如果在清除后没有看到可用空间发生变化,则需要执行以下操作:
There's a common problem with some MySQL configurations in which all databases are stored in a single file called ibdata1
. What happens is that when you delete old databases this file does not shrink automatically.
某些MySQL配置存在一个常见问题,其中所有数据库都存储在名为ibdata1的单个文件中。发生的情况是,当您删除旧数据库时,此文件不会自动收缩。
Check the size of the files in /var/lib/mysql/
and if you see that ibdata1
size doesn't change after deleting some old databases, then you need to do some clean up.
检查/ var / lib / mysql /中文件的大小,如果在删除一些旧数据库后发现ibdata1大小没有改变,那么你需要做一些清理工作。
Steps:
脚步:
- Backup your databases
- 备份数据库
- Delete your databases
- 删除您的数据库
- Delete ibdata1 using
rm /var/lib/mysql/ibdata1
- 使用rm / var / lib / mysql / ibdata1删除ibdata1
- Delete ib_logfile(s) using
rm /var/lib/mysql/ib_logfile*
- 使用rm / var / lib / mysql / ib_logfile删除ib_logfile *
- Restart MySQL with
service mysql restart
- 用service mysql restart重启MySQL
- Import your backed up databases.
- 导入备份的数据库。
Now, there should be enough space for /tmp
to grow and execute your queries!
现在,/ tmp应该有足够的空间来增长和执行查询!
Good luck!
祝你好运!
Notes:
笔记:
For more details on the purging visit John P's answer here: https://*.com/a/3456885/2188595
有关清除的更多详细信息,请访问John P的答案:https://*.com/a/3456885/2188595
#1
1
You should continuously check your /tmp folder size while triggering "USER REPORT Query".
您应该在触发“USER REPORT Query”时连续检查/ tmp文件夹大小。
If /tmp directory is 100% utilized you would experience this error.
如果/ tmp目录是100%使用,您将遇到此错误。
Solution is to mount some GB's to /tmp directory or set new location of MySQL tmp.
解决方法是将一些GB安装到/ tmp目录或设置MySQL tmp的新位置。
To setting up New location:
要设置新位置:
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
打开MY.CNF文件
/etc/my.cnf
Add below line under the [mysqld] section and save the file
在[mysqld]部分下面添加以下行并保存文件
tmpdir=/home/mysqltmp
Restart MySQL
重启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
| slave_load_tmpdir | / home / mysqltmp | tmpdir | /家/ mysqltmp
Done !!
完成!!
Try refresh the Page.
尝试刷新页面。
#2
0
First, check with df -h
if the storage device is nearly full, if that's the case, then you need to free up some space.
首先,使用df -h检查存储设备是否已满,如果是这种情况,则需要释放一些空间。
Deleting old databases may be solution, but if you don't see a change in free space after the purge, then you need to do the following:
删除旧数据库可能是解决方案,但如果在清除后没有看到可用空间发生变化,则需要执行以下操作:
There's a common problem with some MySQL configurations in which all databases are stored in a single file called ibdata1
. What happens is that when you delete old databases this file does not shrink automatically.
某些MySQL配置存在一个常见问题,其中所有数据库都存储在名为ibdata1的单个文件中。发生的情况是,当您删除旧数据库时,此文件不会自动收缩。
Check the size of the files in /var/lib/mysql/
and if you see that ibdata1
size doesn't change after deleting some old databases, then you need to do some clean up.
检查/ var / lib / mysql /中文件的大小,如果在删除一些旧数据库后发现ibdata1大小没有改变,那么你需要做一些清理工作。
Steps:
脚步:
- Backup your databases
- 备份数据库
- Delete your databases
- 删除您的数据库
- Delete ibdata1 using
rm /var/lib/mysql/ibdata1
- 使用rm / var / lib / mysql / ibdata1删除ibdata1
- Delete ib_logfile(s) using
rm /var/lib/mysql/ib_logfile*
- 使用rm / var / lib / mysql / ib_logfile删除ib_logfile *
- Restart MySQL with
service mysql restart
- 用service mysql restart重启MySQL
- Import your backed up databases.
- 导入备份的数据库。
Now, there should be enough space for /tmp
to grow and execute your queries!
现在,/ tmp应该有足够的空间来增长和执行查询!
Good luck!
祝你好运!
Notes:
笔记:
For more details on the purging visit John P's answer here: https://*.com/a/3456885/2188595
有关清除的更多详细信息,请访问John P的答案:https://*.com/a/3456885/2188595