Giter Site home page Giter Site logo

Comments (7)

mnapoli avatar mnapoli commented on July 17, 2024

Thanks for the report, indeed I cannot help a lot with Windows support.

However could you try running the command tar -xzf .bref/bin/php/php-7.2.5.tar.gz -C .bref/output/.bref/bin manually? Or any kind of command with tar -xzf if the file doesn't exist.

I'm suspecting this command doesn't work on windows.

from bref.

incoming-th avatar incoming-th commented on July 17, 2024

Alright, I tried to manually run the command and this is the output:

PS C:\Users\thxxxxxaip\Desktop\test\bref> tar -xzf .bref/bin/php/php-7.2.5.tar.gz -C .bref/output/.bref/bin
php: truncated gzip input
tar.exe: Error exit delayed from previous errors.

So I suspect the file was corrupted (maybe because it was bundled from a non windows machine) and I downloaded a new one from the source on https://secure.php.net/get/php-7.2.5.tar.gz/from/a/mirror and saved the file into .bref\bin\php

I re-ran the deploy command and got:

PS C:\Users\xxxxx\Desktop\test\bref> vendor/bin/bref deploy

 0/8 [>---------------------------] < 1 sec

 1/8 [===>------------------------] < 1 sec
Building the project in the `.bref/output` directory
 1/8 [===>------------------------] < 1 sec
Building the project in the `.bref/output` directory
 2/8 [=======>--------------------] < 1 sec
Downloading PHP in the `.bref/bin/` directory
 2/8 [=======>--------------------] < 1 sec
Downloading PHP in the `.bref/bin/` directory
 3/8 [==========>-----------------] < 1 sec
Installing the PHP binary
 3/8 [==========>-----------------] < 1 sec
In Process.php line 1236:

  The process "tar -xzf .bref/bin/php/php-7.2.5.tar.gz -C .bref/output/.bref/bin" exceeded the timeout of 60 seconds.


deploy [--dry-run] [--stage STAGE]

I re-ran the untar command manually and after 3-4 minutes it completed with no error, making the untar command not the cause.

But even if I change max_input_time, max_execution_time or default_socket_timeout I still get the timeout. Maybe this is not related to php.ini but PowerShell - which I doubt.

Also maybe an idea to add a parameter in the deploy command to skip the untar step if we already "untared" the php archive?

Thanks

from bref.

mnapoli avatar mnapoli commented on July 17, 2024

OK so maybe there's a way to fix this:

https://github.com/mnapoli/bref/blob/c63892f0dc516ff5265d381885aa17369625b026/src/Console/Deployer.php#L163-L164

This is the line that runs the tar command. By default the Symfony Process class has a timeout of 60 seconds. We could remove that timeout? (or set it to 5 minutes?)

See an example here:

https://github.com/mnapoli/bref/blob/c63892f0dc516ff5265d381885aa17369625b026/src/Console/Deployer.php#L66

If you can try it on your machine and it works you could send a pull request?

from bref.

incoming-th avatar incoming-th commented on July 17, 2024

I tried to run the deployment from the Ubuntu App on Windows 10 but still got the same error.

2018-12-02 003371

So I looked at the code and as you explained the default timeout is 60s. I have added this and it works:

2018-12-02 003372

FYI, it took me 14min to deploy the sample code. My machine is using SSD so I assume the bottleneck is the CPU (i7 - first gen?).

Uploading the lambda
 7/8 [========================>---] 14 mins
Deployment success
 8/8 [============================] 14 mins

from bref.

mnapoli avatar mnapoli commented on July 17, 2024

Yes I have to agree that the tar process taking so long is really really surprising. On my machine (Mac) the whole deployment takes like 30 seconds…

If I were you I'd try investigating why tar takes so long on Windows. You have a good processor and a SSD so I see no reason for this to take so long…

from bref.

incoming-th avatar incoming-th commented on July 17, 2024

At least it allowed to discover this minor enhancement but I will investigate why, it may be related to Windows Defender.

Made a PR, all the processes finished but now facing the same issue #80

Closing this issue.

from bref.

staabm avatar staabm commented on July 17, 2024

I would guess a antivirus software is slowing the tar process

from bref.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.