hiqdev / asset-packagist

Asset Packagist
https://asset-packagist.org
BSD 3-Clause "New" or "Revised" License
247 stars 24 forks source link

Unable to fetch asset-packagist.org from India #164

Closed abhisekmazumdar closed 5 months ago

abhisekmazumdar commented 5 months ago

Please provide your composer.json if appropriate.

A composer.json file with https://asset-packagist.org in repositories is not functioning(asset-packagist.org is timing out) for me in India. To make it work, I need to use a VPN and change my country.

SilverFire commented 5 months ago

Hello Please, run the bash command mtr asset-packagist.org and post a screenshot

abhisekmazumdar commented 5 months ago

> sudo mtr asset-packagist.org --report

Output:

Start: 2024-03-11T20:43:11+0530
HOST: abhisek-morpht.local        Loss%   Snt   Last   Avg  Best  Wrst StDev
  1.|-- 192.168.29.1               0.0%    10    3.1   2.8   2.5   3.1   0.2
  2.|-- 10.13.160.1                0.0%    10   10.3   6.0   3.9  10.3   1.9
  3.|-- 172.31.3.64                0.0%    10    4.8   5.9   4.8   8.5   1.2
  4.|-- 192.168.92.242             0.0%    10    6.2   6.1   4.8   7.1   0.8
        192.168.92.240
  5.|-- 172.26.106.117             0.0%    10    4.6   6.0   4.1   8.5   1.3
  6.|-- 172.26.106.98              0.0%    10    5.0   6.2   4.7   7.9   1.1
  7.|-- 192.168.92.166             0.0%    10    5.9   7.6   5.9  12.9   2.1
        192.168.92.164
  8.|-- ???                       100.0    10    0.0   0.0   0.0   0.0   0.0
  9.|-- ???                       100.0    10    0.0   0.0   0.0   0.0   0.0
 10.|-- 103.198.140.176            0.0%    10   10.2  10.5   8.8  12.3   1.2
 11.|-- 103.198.140.215            0.0%    10  129.6 133.6 128.6 156.4   8.2
 12.|-- 103.198.140.77             0.0%    10  138.1 139.2 137.6 142.0   1.4
 13.|-- 80.249.214.92              0.0%    10  210.6 232.4 203.6 261.0  22.0
 14.|-- ???                       100.0    10    0.0   0.0   0.0   0.0   0.0
sagarrchauhan commented 5 months ago

Facing the same issue from past 2 days. Haven't used VPN to test if this is country specific issue.

SilverFire commented 5 months ago

We're working on this problem with our ISP.

sahilr2050 commented 5 months ago

Problem continue.

I tried to access it with Singapore VPN but still facing same issue.

abhisekmazumdar commented 5 months ago

Problem continue.

I tried to access it with Singapore VPN but still facing same issue.

Nothing in Asia seems to be working. I suggest considering a country in Europe or the US instead.

SilverFire commented 5 months ago

Hey folks. Our ISP states there are no global problems and they need more data to debug the issue.

I tried to download https://asset-packagist.org/p/provider-latest/latest.json (which is the file that Composer tries to download) from different locations using the website monitoring services. These services probe the URL from and show results.

The sites have shown pretty consistent success results:

Could you help me reproduce the issue so I can communicate ISP to resolve it?

sahilr2050 commented 5 months ago

When executing Composer commands such as install, update, or require, I am encountering an error related to asset-packagist.org. The specific error message is as follows:

"asset-packagist.org could not be fully loaded due to a curl error 28 while attempting to download https://asset-packagist.org/p/provider-latest/db4a54bdd12ee87fab893bf74b747fa04fbcae4498410be6d5bec9f2907b9660.json. The operation timed out after 300011 milliseconds, having received only 7397128 out of the expected 11699299 bytes. Consequently, package information was loaded from the local cache, which may not reflect the most current data."

Upon attempting to access the provided URL in a web browser, I've observed that the page load time is significantly prolonged, which suggests that asset-packagist.org is experiencing slow response times. This issue appears to be impacting the efficiency of Composer operations that rely on data from this repository.

The same URL I accessed with Europe VPN, it loads quickly.

SilverFire commented 5 months ago

The error message says you spent 300 seconds on downloading 11Mb and was kicked due to the time out. At least you have some connectivity with the server, but the speed is around 20KBps, as far as I see.

Could you run https://www.speedtest.net/ test to the Amsterdam - RETN node and share your results, please?

CleanShot 2024-03-13 at 15 11 18@2x

abhisekmazumdar commented 5 months ago

Here the speedtest:

image

https://www.speedtest.net/result/16005273799

abhisekmazumdar commented 5 months ago

It look around 9 mins for me to load https://asset-packagist.org/p/provider-latest/latest.json.

image

Here the HAR file asset-packagist.org.har.zip

SilverFire commented 5 months ago

Thank you for the provided info, I've contacted our ISP for further investigation on this problem and will keep you updated.

budimanlai commented 5 months ago

same issue.

curl error 28 while downloading https://asset-packagist.org/p/provider-latest/1b92b85dbda9ecb57dcc3b563da39e1003a359c41941cd284f1fa3919466dd00.json: Operati on timed out after 300002 milliseconds with 5353224 out of 11722018 bytes received

how to solve this issue?

SilverFire commented 5 months ago

We are working with the ISP to identify and resolve the problem.

SilverFire commented 5 months ago

We have signed for the CDN to speed up file download worldwide. Try to change in your composer.json the repository section as follows:

"repositories": [
    {
        "type": "composer",
        "url": "https://cdn.asset-packagist.org"
    }
]

You might notice asset-packagist.org was replaced with cdn.asset-packagist.org.

Could you try the download speed from the CDN and let me know of results?

~We are still working on HTTPS for this domain, I will let you know when HTTPS will be available so you can try switching to HTTPS as well.~

UPD: HTTPS is ready

budimanlai commented 5 months ago
https://cdn.asset-packagist.org

thank you man. You save my day. It's work.

abhisekmazumdar commented 5 months ago

Initial testing indicates successful performance of the new cdn url without encountering any timeout errors.

We have numerous projects that rely on asset-packagist dependency. Moving forward, both https://cdn.asset-packagist.org and https://asset-packagist.org will remain viable options.

Furthermore, additional testing with real users will be necessary to assess location-specific performance accurately.

SilverFire commented 5 months ago

Great. I will change the infrastructure to make https://asset-packagist.org/ work via CDN so other developers don't need to change their composer.json files.

shubhamprasadqed42 commented 5 months ago

I was still facing issue with https://asset-packagist.org/ post replacing it with https://cdn.asset-packagist.org/ it worked.

SilverFire commented 5 months ago

From now on asset-packagist.org will redirect all requests to the CDN.

> curl -I https://asset-packagist.org/p/provider-latest/latest.json
HTTP/2 302
server: nginx/1.17.6
date: Thu, 21 Mar 2024 14:44:24 GMT
content-type: text/html
content-length: 145
location: https://cdn.asset-packagist.org/p/provider-latest/latest.json
strict-transport-security: max-age=31536000

Note the Location: header in the response.

abhisekmazumdar commented 5 months ago

Yes, I confirm that I am not facing the issue anymore.

Thank you very much.