[英]SLOW Drupal over localhost | windows7 EasyPHP 64x
I am running Drupal 7.16 on my laptop(Windows7 x64 with 6gb RAM over EasyPHP12.1). 我在我的笔记本电脑上运行Drupal 7.16(Windows7 x64,EasyPHP12.1上带有6GB RAM)。
For now the drupal running very slow! 现在drupal跑得很慢!
I already try to: 我已经尝试:
realpath_cache_size
to 24M
realpath_cache_size
增加到24M
innodb_flush_log_at_trx_commit
to 0
innodb_flush_log_at_trx_commit
更改为0
hosts
file to resolve ipv6 bug.. hosts
文件以解决ipv6错误.. SELECT uid FROM users
) the phpMyAdmin return a quick respond(0.0009s).. SELECT uid FROM users
)时,phpMyAdmin返回快速响应(0.0009s).. Thanks, 谢谢,
~Almog 〜阿尔莫格
* I also tried UniformServer and it still slow, and changing the my.ini follwing the posts over here(stackexchange websites) and follwing drupal.org * 我也尝试过UniformServer,它仍然很慢,并且在这里更改了my.ini的帖子(stackexchange网站)和随后的drupal.org
** It's seems that wordpress load fast, so it seems that the problem is with the drupal only? ** 似乎wordpress加载速度很快,所以似乎问题只与drupal有关?
You have two ways: 你有两种方式:
1) Tune your installation: install php-apc, install monitoring software ( sysinternals ) to detect bottleneck, install xdebug, Wincachegrind etc. 1)调整你的安装:安装php-apc,安装监控软件( sysinternals )来检测瓶颈,安装xdebug, Wincachegrind等。
2) Use some preconfigured software: acquia , vagrant 2)使用一些预先配置的软件: acquia , vagrant
My solution for now: 我现在的解决方案:
Now it run much better! 现在它运行得更好! not perfect.. but it mainly because I want drupal in deploy mode!
不完美..但主要是因为我想在部署模式下使用drupal!
* the deafults setting of EasyPHP is well-done! * EasyPHP的结果设置很好! there is not much to change!
没有太大的改变! *
*
There are 2 solutions to handle Drupal's slowness on windows machine: 在Windows机器上有两种解决Drupal缓慢的解决方案:
1. Hosts file Settings 1.主机文件设置
Make following changes in your hosts file… 在主机文件中进行以下更改...
i. 一世。 Call the apache web server address by ip address.
通过ip地址调用apache Web服务器地址。 On a local computer it is 127.0.0.1
在本地计算机上它是127.0.0.1
ii. II。 Comment ::1 localhost line in hosts file which is a mapping in TCP/IP v6 protocol
注释:: hosts文件中的1个localhost行,它是TCP / IP v6协议中的映射
2. Disable/Adjust TCP/IP v6 protocol of your network interface 2.禁用/调整网络接口的TCP / IP v6协议
There are two options… 有两种选择......
i. 一世。 Disable TCP/IP v6 protocol of your network interface so that windows doesn't try to resolve your hostname to an ipv6 address.
禁用网络接口的TCP / IP v6协议,以便Windows不会尝试将主机名解析为ipv6地址。
ii. II。 ipv6 does not need to be disabled.
不需要禁用ipv6。 Open your command prompt as an administrator and use following commands in command prompt
以管理员身份打开命令提示符,并在命令提示符中使用以下命令
netsh
interface
portproxy
add v6tov4 listenport=80 connectport=80
80 is your web server port of course 当然,80是您的Web服务器端口
Drupal has always run slowly for me when hosted on Windows. 在Windows上托管时,Drupal对我来说总是运行缓慢。 I've tried xampp, bare bones apache/php/mysql installs, and zend server.
我试过xampp,裸骨apache / php / mysql安装和zend服务器。 32 or 64 bit doesn't seem to matter for speed, but 32 bit builds seem a bit more available.
32位或64位似乎并不重要,但32位版本似乎更有用。 So far zend seems a little better, but not as fast as a real linux server.
到目前为止zend似乎好一点,但没有真正的linux服务器那么快。 Have you tried VirtualBox with Ubuntu or other Linux?
您是否尝试过使用Ubuntu或其他Linux的VirtualBox? I've run an Ubuntu server with 8GB of ram in my office and it was as fast as a decent VPS server.
我在我的办公室里运行了一台8GB内存的Ubuntu服务器,速度和体面的VPS服务器一样快。 I suggest trying that if you haven't already.
我建议尝试一下,如果你还没有。
Everyone knows slow websites are bad for business and your website users. 每个人都知道慢速网站对企业和网站用户都不利。 However, solving the problem can be challenging, slow to implement, and often requires starting from scratch.
但是,解决问题可能具有挑战性,实施起来很慢,并且通常需要从头开始。
I am using wamp server for my drupal projects on windows7 OS. 我在Windows7操作系统上使用wamp服务器进行drupal项目。 It works very much well.
它运作得非常好。 Its all depends how did you configured your project.
这完全取决于你是如何配置你的项目的。 I am not using any caching technique for my project.
我没有为我的项目使用任何缓存技术。 The system is having 1 million users.
该系统拥有100万用户。 I did database tuning for that so It loads data very fast.
我为此做了数据库调优,因此它可以非常快速地加载数据。
For your application I would recommand you some stuff to do 对于您的应用程序,我建议您做一些事情
尝试运行另一个裸机Drupal安装,以查看问题是否与该特定站点或您的开发设置有关。
I know that this is an old post but I've just gone through this same struggle. 我知道这是一个老帖子,但我刚刚经历了同样的斗争。
I've had a very slow Drupal 7 install on Windows 7 64bit virtual machine. 我在Windows 7 64位虚拟机上安装了非常慢的Drupal 7。 I reliably had 20 second page load times.
我可靠地有20秒的页面加载时间。 I struggled for a while and tried:
我挣扎了一会儿并尝试过:
In the end the Host file changes made some difference but the main issue turned out to be the Drupal CRON. 最后主机文件的变化有所不同,但主要问题是Drupal CRON。
As it turns out, because I was copying down my production installation to work on locally, the CRON wasn't able to do what it was supposed to when it ran locally. 事实证明,因为我正在复制我的生产安装以在本地工作,所以CRON无法在本地运行时执行它应该做的事情。 Therefore it never completed execution successfully.
因此它从未成功完成执行。
Because the attempt failed, each new request would try to run the CRON again, hence the 20 second page execution times. 由于尝试失败,每个新请求都会尝试再次运行CRON,因此执行时间为20秒。
You can disable cron (eg, at Administration > Configuration > System > Cron (admin/config/system/cron), by setting the "Run cron every" value to "Never". 您可以通过将“Run cron every”值设置为“Never”来禁用cron(例如,在管理>配置>系统> Cron(admin / config / system / cron)。
See here for more: https://www.drupal.org/cron 有关更多信息,请参阅此处: https : //www.drupal.org/cron
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.