Comments (7)
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.
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.
OK so maybe there's a way to fix this:
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:
If you can try it on your machine and it works you could send a pull request?
from bref.
I tried to run the deployment from the Ubuntu App on Windows 10 but still got the same error.
So I looked at the code and as you explained the default timeout is 60s. I have added this and it works:
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.
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.
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.
I would guess a antivirus software is slowing the tar process
from bref.
Related Issues (20)
- Feedback for “Cron tasks on AWS Lambda” HOT 1
- Handle "Response too big" in Console functions HOT 2
- PlanetScale removed the Hobby tier
- Long running CLI commands repeat every 2 minutes HOT 1
- Troubleshooting Bref Docker Deployment with Octane Handler
- Symfony CLI DATABASE_URL Not Found HOT 1
- Can I fire putJobSuccessResult event from AWS Lambda which is developed with Bref? HOT 1
- Feedback for “Custom domain names” HOT 1
- I am getting this issue :-
- OPENSSL_3.3.0' not found (required by /opt/lib/libssl.so.3) HOT 10
- Stopping 1.x maintenance
- Feedback for “Serverless Laravel - Getting started” HOT 3
- NOTICE since upgrading to v2 HOT 1
- Brefv2 500 Errors Not In Logs HOT 5
- PHP ext-intl is required on layer 8.3 HOT 1
- CURL SSL_ERROR_SYSCALL calling another Lambda HOT 7
- Env always return null after update packages to bref 2 version
- max_execution_time not working HOT 3
- Laravel 11, PHP 8.3 mysql driver not enabled, also can't use postgress
- Bref Serverless v4 HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bref.