跳转到主要内容
ddfiberglass_0xe 提交于 26 August 2013

大家好,我将一个虚拟主机的Drupal迁移到VPS(Debian 6系统,LNMP.ORG安装包,启用MySQL InnoDB)后,我测试注册用户时出现了错误。

  • 昵称 ****** 已被占用。
  • 电子邮件地址 ***** 已经注册过了。忘记密码了吗?

但是实际是没有占用、注册的。另外,这个注册花费了很长的时间,甚至有时候出现502错误。而如果是昵称确实被占用,但是邮件地址未注册时,很快就会提示昵称被占用的结果页面。

此外,在管理用户的后台页面,马上又能看到刚刚注册的用户,而且是已经激活的了(本来是要管理员的账户操作激活的)。

 

另外,还有一个错误是在后头,禁用或激活一个账户时,也经常提示错误。但是如果是取消某个账户,很快就好了。

PDOException: SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction: UPDATE {users} SET name=:db_update_placeholder_0, pass=:db_update_placeholder_1, mail=:db_update_placeholder_2, theme=:db_update_placeholder_3, signature=:db_update_placeholder_4, signature_format=:db_update_placeholder_5, created=:db_update_placeholder_6, access=:db_update_placeholder_7, login=:db_update_placeholder_8, status=:db_update_placeholder_9, timezone=:db_update_placeholder_10, language=:db_update_placeholder_11, picture=:db_update_placeholder_12, init=:db_update_placeholder_13, data=:db_update_placeholder_14 WHERE (uid = :db_condition_placeholder_0) ; Array ( [:db_update_placeholder_0] => david tan [:db_update_placeholder_1] => $S$DM0rQnB0xJdmPSsENynuFKU5Jnzt/PDVNENLLjDEJvSziZqEiYJR [:db_update_placeholder_2] => ********@qq.com [:db_update_placeholder_3] => [:db_update_placeholder_4] => [:db_update_placeholder_5] => plain_text [:db_update_placeholder_6] => 1377525881 [:db_update_placeholder_7] => 0 [:db_update_placeholder_8] => 0 [:db_update_placeholder_9] => 1 [:db_update_placeholder_10] => Asia/Shanghai [:db_update_placeholder_11] => zh-hans [:db_update_placeholder_12] => 0 [:db_update_placeholder_13] => ********@qq.com [:db_update_placeholder_14] => a:1:{s:7:"contact";i:1;} [:db_condition_placeholder_0] => 268 ) 在 drupal_write_record() (行 7166/home/wwwroot/default/includes/common.inc).

网站遇到了不可预知的错误。请稍后再试。

dd_0.jpg

大家帮忙看看,有没有好的解决办法。谢谢。

 

将Debian 6更新到Debian 7系统后,还是出现类似错误

PDOException: SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction: UPDATE {users} SET name=:db_update_placeholder_0, pass=:db_update_placeholder_1, mail=:db_update_placeholder_2, theme=:db_update_placeholder_3, signature=:db_update_placeholder_4, signature_format=:db_update_placeholder_5, created=:db_update_placeholder_6, access=:db_update_placeholder_7, login=:db_update_placeholder_8, status=:db_update_placeholder_9, timezone=:db_update_placeholder_10, language=:db_update_placeholder_11, picture=:db_update_placeholder_12, init=:db_update_placeholder_13, data=:db_update_placeholder_14 WHERE (uid = :db_condition_placeholder_0) ; Array ( [:db_update_placeholder_0] => ******** [:db_update_placeholder_1] => $S$DlDXPsrqObOOhlM5/5ebqVFrB2lkZAhynB/OMiA51QvptQ7nDBso [:db_update_placeholder_2] => ********@gmail.com [:db_update_placeholder_3] => [:db_update_placeholder_4] => [:db_update_placeholder_5] => plain_text [:db_update_placeholder_6] => 1375341927 [:db_update_placeholder_7] => 0 [:db_update_placeholder_8] => 0 [:db_update_placeholder_9] => 0 [:db_update_placeholder_10] => Asia/Shanghai [:db_update_placeholder_11] => en [:db_update_placeholder_12] => 0 [:db_update_placeholder_13] => ********@gmail.com [:db_update_placeholder_14] => a:1:{s:7:"contact";i:1;} [:db_condition_placeholder_0] => 244 ) 在 drupal_write_record() (行 7166/home/wwwroot/default/includes/common.inc).

网站遇到了不可预知的错误。请稍后再试。

 

Drupal 版本

#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html

# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
[client]
port        = 3306
socket        = /var/run/mysqld/mysqld.sock

# Here is entries for some specific programs
# The following values assume you have at least 32M ram

# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket        = /var/run/mysqld/mysqld.sock
nice        = 0

[mysqld]
#
# * Basic Settings
#
user        = mysql
pid-file    = /var/run/mysqld/mysqld.pid
socket        = /var/run/mysqld/mysqld.sock
port        = 3306
basedir        = /usr
datadir        = /var/lib/mysql
tmpdir        = /tmp
lc-messages-dir    = /usr/share/mysql
skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address        = 127.0.0.1
#
# * Fine Tuning
#
key_buffer        = 128M
max_allowed_packet    = 64M
thread_stack        = 192K
thread_cache_size       = 8
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover         = BACKUP
#max_connections        = 100
#table_cache            = 64
#thread_concurrency     = 10
#
# * Query Cache Configuration
#
query_cache_limit    = 1M
query_cache_size        = 128M
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
# As of 5.1 you can enable the log at runtime!
#general_log_file        = /var/log/mysql/mysql.log
#general_log             = 1
#
# Error log - should be very few entries.
#
log_error = /var/log/mysql/error.log
#
# Here you can see queries with especially long duration
#log_slow_queries    = /var/log/mysql/mysql-slow.log
#long_query_time = 2
#log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
#       other settings you may need to change.
#server-id        = 1
#log_bin            = /var/log/mysql/mysql-bin.log
expire_logs_days    = 10
max_binlog_size         = 100M
#binlog_do_db        = include_database_name
#binlog_ignore_db    = include_database_name
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
#
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem



[mysqldump]
quick
quote-names
max_allowed_packet    = 64M

[mysql]
#no-auto-rehash    # faster start of mysql but no tab completition

[isamchk]
key_buffer        = 128M

#
# * IMPORTANT: Additional settings that can override those from this file!
#   The files must end with '.cnf', otherwise they'll be ignored.
#
!includedir /etc/mysql/conf.d/