-
-
Notifications
You must be signed in to change notification settings - Fork 645
Composer timeouts and slowness due to default use of vboxsf on Windows #1242
Comments
@fb-multimedia - If you're on an older computer (especially if you don't have an SSD), or if you're using native shared folders, or if you have a slower Internet connection, or if your Internet connection is behind a firewall or proxy, you may have issues with the command. Are you having trouble running that command manually, or does Drupal VM show a failure during Did you set the timeout like: And does it do anything, or does it just hang after you run the command? If it's doing stuff, and failing at 1200 seconds, then maybe you need to increase the timeout to 2000, 3000, or even more (again, depends on your environment). |
Thanks for your answer. |
@fb-multimedia - Ah, in that case it was definitely the shared folder type. The default The best option for speed is to use See these two guides for more information:
Another option—though it won't help with performance—is to extend Composer's timeout. |
The setup that I use is to have vagrant_synced_folders:
- local_path: .
destination: /var/www/drupal
id: drupal
type: rsync
create: true
excluded_paths: ['.git/', '.tmp/', 'node_modules/', 'sites/default/files/', 'config/drupal']
options_override:
owner: vagrant
group: www-data
# Use slower but two-way NFS sync for configuration sync directory.
- local_path: config/drupal
destination: /var/www/drupal/config/drupal
type: "" # On Windows, on macOS "nfs"
create: true Note this example only works in drupal vm master because of a bug where |
@oxyc - That's... brilliant! It's slightly obtuse, but if you're on Windows 7 or Windows 8, that's definitely the best way to go, unless your codebase is many GB (which it hopefully isn't). We need to get this added to the docs. And I'm going to rebuild my Windows 7 PC again to see if it'll work well that way (with a BLT project). I definitely need to tag a new release, probably another minor version bump due to a few improvements. (Update: see #1257) |
@geerlingguy FYI I tried out the smb solution with my class and it worked for composer, but failed when the website had to write anything. Using smb:
I'm going to try @oxyc 's recommendation right now, with the (maybe) additional restriction of also syncing custom modules + themes over nfs. |
@ashabed - Another note—when using SMB, you should right click on your terminal environment and "Run as administrator"—else some things get screwed up. It might be worth recommending people use makefiles if they're on Windows (if they're just trying to get something up and running and aren't building an entire new Drupal project for ultimate deployment to a production environment). Drush Make is a lot faster than Composer for this kind of thing. |
I have to investigate, cause when using smb as type sharing (using powershell as admin) I get errors on vagrant up. |
@fb-multimedia if you can manage to get guest-to-host samba sharing to work please let me know how. I tried doing this but could never figure it out. |
Updating issue title to more accurately reflect the problem. |
@AMDAndy - Please see #1265 for discussion on SMB shares from guest to host. I know some other people have gotten it working, and though it's not the most optimal way to easily build the environment (you have to manually mount the shared folder on your host after each |
@geerlingguy you're absolutely killing it today! I don't mind complication as I get a fast dev environment. |
@AMDAndy - You're in luck, because I'm currently helping a client in a Windows 7 (!) environment try to find a way to make development bearable. It's been about 3 years since the last time I was looking into this issue, and back then my answer was to use |
We're stuck on Windows 7 and we're working within the VMs completely on our work laptops currently. We did steal some iMacs from our design group for our desks and I'm now running Ubuntu on my home desktop so it's not the most urgent thing for me. I'm glad you're stuck working on it, though. 👍 |
@AMDAndy - I also tried SSHFS and found there were too many bugs with Windows to be very reliable (it seems like once those bugs are fixed it might be the best option since it could work with Vagrant automatically). The winner so far is to create a reverse Samba (SMB) share, from the Ubuntu guest to the Windows host, and I'm working on docs. I'll be pushing those over to #1265. But basically, to tie off this particular issue: Composer stuff is going to be extraordinarily slow on Windows when using standard If I were stuck on Windows, I would definitely do that (reverse mount) even though it (currently) requires a few manual steps whenever you build a new VM the first time. Let's move that discussion over to #1265 |
With the new samba reverse parameters in #1265 I can now use composer to install drupal 8 without error in 3 minutes ! Thank you geerlinguy |
@fb-multimedia - Wonderful! Glad I can help :) |
Issue Type
Your Environment
Your OS
Full console output
Summary
Hello,
I know it's not the first report for this error, but I haven't find solution.
After many try I can't use composer to create a new drupal 8 project :
composer create-project drupal-composer/drupal-project:8.x-dev drupal8 --stability dev --no-interaction
I always have a composer timeout and the message "couldn't delete web/core"
I have try to install in another directory instead of the share folder but same problem.
I have change the COMPOSER_PROCESS_TIMEOUT: 1200
Can somebody confirm that this command actually work good with drupal vm under windows with default share folder ?
Thanks.
The text was updated successfully, but these errors were encountered: