在 Windows 虚拟机上托管的 WAMP 上建立数据库时经常出错
Frequent Error Establishing Database on WAMP hosted on Windows Virtual Machine
我在 Windows 虚拟机上托管的 WAMP 上越来越频繁 "error establishing database connection"。
我正在 运行在 Windows Azure 上的 WAMP 托管虚拟机上安装 Wordpress。
每次出现错误时,我都会登录Windows服务器并重新启动所有服务。这使得安装 运行 几个小时后错误再次出现。
我已经修复和优化了数据库,但问题仍然存在。
我最初应该使用 IIS,但事情已经完成(安装到现在为止 7 个月都运行良好)
请提出一个持久的解决方案。谢谢。
将这两行添加到 httpd.conf
文件可以帮助解决此类问题。
# AcceptFilter: On Windows, none uses accept() rather than AcceptEx() and
# will not recycle sockets between connections. This is useful for network
# adapters with broken driver support, as well as some virtual network
# providers such as vpn drivers, or spam, virus or spyware filters.
AcceptFilter http none
AcceptFilter https none
此外,如果您使用 127.0.0.1
而不是 localhost
作为 php 连接的主机参数,有时也会有所帮助。
我在 Windows 虚拟机上托管的 WAMP 上越来越频繁 "error establishing database connection"。
我正在 运行在 Windows Azure 上的 WAMP 托管虚拟机上安装 Wordpress。
每次出现错误时,我都会登录Windows服务器并重新启动所有服务。这使得安装 运行 几个小时后错误再次出现。
我已经修复和优化了数据库,但问题仍然存在。
我最初应该使用 IIS,但事情已经完成(安装到现在为止 7 个月都运行良好)
请提出一个持久的解决方案。谢谢。
将这两行添加到 httpd.conf
文件可以帮助解决此类问题。
# AcceptFilter: On Windows, none uses accept() rather than AcceptEx() and
# will not recycle sockets between connections. This is useful for network
# adapters with broken driver support, as well as some virtual network
# providers such as vpn drivers, or spam, virus or spyware filters.
AcceptFilter http none
AcceptFilter https none
此外,如果您使用 127.0.0.1
而不是 localhost
作为 php 连接的主机参数,有时也会有所帮助。