packagephobia icon indicating copy to clipboard operation
packagephobia copied to clipboard

504 GATEWAY_TIMEOUT when uploading package.json file

Open saif-o99 opened this issue 2 years ago • 4 comments

just by uploading a package.json file i get this error image

saif-o99 avatar Jul 11 '23 13:07 saif-o99

The package.json file is currently processed on the server so if it takes more than 30 seconds to install all dependencies, you will see this timeout error.

One solution is we could process the package.json on the client and fetch each package size individually from the server. That would give you 30 seconds per dependency.

Currently, Package Phobia is using 900 GB-hrs of Serverless Function execution per month and that change will likely increase usage, so I don't think I'll make that change any time soon.

styfle avatar Jul 11 '23 14:07 styfle

Does migrating from yarn to pnpm, help with this? As it is a bit faster than yarn

MathurAditya724 avatar Oct 30 '23 15:10 MathurAditya724

I doubt that the perf difference will be big enough. The frontend should probably parse the file on the client and then make multiple API requests to the server.

styfle avatar Oct 30 '23 23:10 styfle

Also seeing that error with certain big packages like eslint-config-hardcore, which is 177MB.

silverwind avatar Mar 16 '24 00:03 silverwind