mirror icon indicating copy to clipboard operation
mirror copied to clipboard

Will it break the existing mirror if i migrate to this ?

Open varunsridharan opened this issue 4 years ago • 7 comments

Hi There

I am currently running a mirror in india (https://packagist.in/) and it uses https://github.com/webysther/packagist-mirror

and it runs mirror for V1. but i want to support V1 & V2

so i am planing on using this script. i can create my own home page but will this break existing users if i migrate to this script ?

varunsridharan avatar Nov 23 '20 03:11 varunsridharan

No it should not break anything.. As long as you let it sync up before putting it in prod. The current version of webysther's mirror is actually breaking things for composer 2 users.

Seldaek avatar Nov 23 '20 12:11 Seldaek

@Seldaek will this works with apache server or it requires nginx ? because webysther code requires nginx

varunsridharan avatar Nov 23 '20 12:11 varunsridharan

It should work with apache I think, but I haven't tested it.. I added web server requirements now in the readme: https://github.com/composer/mirror/blob/master/README.md#requirements

Seldaek avatar Nov 23 '20 12:11 Seldaek

@Seldaek thanks i will check . if any issues will get back to you

varunsridharan avatar Nov 23 '20 12:11 varunsridharan

@Seldaek

i tried to run this inside cPanel and this script keeps getting errors

[24-Nov-2020 02:05:43 UTC] PHP Fatal error:  Uncaught Symfony\Component\HttpClient\Exception\TransportException: Failure when receiving data from the peer for "https://repo.packagist.org/p/religis/utils$b060cc2de65557193dc7ae14ad74a4a9220c7e02b2395ccf884799cdba1c67ee.json". in /home/packagist/public_html/mirror/vendor/symfony/http-client/Response/CurlResponse.php:297
Stack trace:
#0 /home/packagist/public_html/mirror/vendor/symfony/http-client/Response/ResponseTrait.php(326): Symfony\Component\HttpClient\Response\CurlResponse::perform(Object(Symfony\Component\HttpClient\Internal\CurlClientState), Array)
#1 [internal function]: Symfony\Component\HttpClient\Response\CurlResponse::stream(Array, NULL)
#2 /home/packagist/public_html/mirror/vendor/symfony/http-client/Response/ResponseStream.php(47): Generator->rewind()
#3 /home/packagist/public_html/mirror/mirror.php(421): Symfony\Component\HttpClient\Response\ResponseStream->rewind()
#4 /home/packagist/public_html/mirror/mirror.php(725): Mirror->sync()
#5 {main}

Next Symfony\Component\HttpClient\Exception\T in /home/packagist/public_html/mirror/vendor/symfony/http-client/Chunk/ErrorChunk.php on line 65
[24-Nov-2020 02:10:15 UTC] PHP Fatal error:  Uncaught Symfony\Component\HttpClient\Exception\TransportException: Couldn't connect to server for "https://repo.packagist.org/p/sskaje/ipcalc$72514e9873ec7afecf8788fd62c05a2a6b7ceafe7c01cd484fadfbd08786a637.json". in /home/packagist/public_html/mirror/vendor/symfony/http-client/Response/CurlResponse.php:297
Stack trace:
#0 /home/packagist/public_html/mirror/vendor/symfony/http-client/Response/ResponseTrait.php(326): Symfony\Component\HttpClient\Response\CurlResponse::perform(Object(Symfony\Component\HttpClient\Internal\CurlClientState), Array)
#1 [internal function]: Symfony\Component\HttpClient\Response\CurlResponse::stream(Array, NULL)
#2 /home/packagist/public_html/mirror/vendor/symfony/http-client/Response/ResponseStream.php(47): Generator->rewind()
#3 /home/packagist/public_html/mirror/mirror.php(421): Symfony\Component\HttpClient\Response\ResponseStream->rewind()
#4 /home/packagist/public_html/mirror/mirror.php(725): Mirror->sync()
#5 {main}

Next Symfony\Component\HttpClient\Exception\TransportExcepti in /home/packagist/public_html/mirror/vendor/symfony/http-client/Chunk/ErrorChunk.php on line 65

I tried increasing execution time & memory but nothing works. !!

varunsridharan avatar Nov 24 '20 02:11 varunsridharan

Yeah sorry but I have no idea what might be causing this. Looks like poor network connectivity to me.

Seldaek avatar Nov 24 '20 08:11 Seldaek

I have no ideas and experiences about running this mirror script inside cPanel.

But it's worked for me on a VPS (virtual private server) with Ubuntu 18.04.

Maybe I think it's about the temporary network connectivity.

peter279k avatar Nov 27 '20 17:11 peter279k