游民宅基地缓慢 [英] Vagrant Homestead slow

查看:52
本文介绍了游民宅基地缓慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个基于Laravel Homestead的无业游民服务器,用于在本地测试我的Laravel网站,大部分情况下运行良好.但是,最近,我遇到了问题,它只能停止几分钟(典型)到几个小时(罕见)的工作.这大约每15分钟发生一次.如果我在ssh连接中键入内容,它将停止.然后,几分钟后再回来查看时,我刚才输入的内容就在那里了.这不仅是SSH,而且页面会停止加载,流浪者命令(包括rsync甚至是停止)都会失败.

I have a vagrant server based off Laravel Homestead for testing my Laravel sites locally for the most part it runs great. However, recently, I have been having problems where it will just halt for anything from a few minutes (typical) to hours (rare). This happens every 15 minutes or so. To the point where if I'm typing in the ssh connection it will just stop. Then when I check back a few minutes later, what I had been typing is now there. This isn't just SSH and pages stop loading, and vagrant commands including rsync and even halt fail.

这是普通的Homestead,除了我将映射更改为通过rsync(手动,每当我要更新服务器时,我都会运行rsync命令).这样做的原因是因为我获得了30秒左右的网页加载时间,并且经过研究并尝试使用rsync,这在很大程度上帮助了这一工作.另外,由于问题,我尝试使它可以访问所有4个cpus.如果这很重要,我将在Macbook Air 2013上运行此程序.在过去的两个月中,它一直运行良好.流浪者服务器正在运行,内存为2048MB,我有15GB的可用磁盘空间.

This is vanilla Homestead, except for I changed the mapping to be via rsync (manual, I run the rsync command whenever I want to update the server). The reason for this was because I was getting 30second or so load times for webpages and after research and trying rsync this helped massively for this. Also, I have (since the problem) tried giving it access to all 4 cpus. I am running this on a macbook air 2013 if this is important. It has been running fine for the past 2 months. The vagrant server is running with 2048MB of memory and I have 15GB of disk space free.

这是一个非常令人沮丧的问题,因为它大大降低了开发速度.

This is a very frustrating problem as it slows down development massively.

编辑:在ssh上使用mysql命令行时,这似乎是最常见的(但不是排他性的)

edit: This seems to happen most frequently (but not exclusively) when using the mysql command line over ssh

推荐答案

我在Windows上遇到了同样的问题,并且此问题已得到解决:

I had the same issue on windows and this fixed it:

安装这个流浪汉插件: vagrant plugin install vagrant-winnfsd

install this vagrant plugin: vagrant plugin install vagrant-winnfsd

然后将其添加到您的homestead.yaml中: type: nfs

then add this to your homestead.yaml: type: nfs

yaml文件应如下所示:

yaml file should look like this:

folders:
    - map: C:\my-www
      to: /home/vagrant/my-www
      type: nfs

完成所有步骤后,请消灭流浪者并执行vagrant up.

when all is done destroy your vagrant and do vagrant up.

这篇关于游民宅基地缓慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆