simonw / datasette-publish-vercel

Datasette plugin for publishing data using Vercel
Apache License 2.0
44 stars 7 forks source link

Database download doesn't work #23

Open simonw opened 4 years ago

simonw commented 4 years ago

I'm trying to download your SQLite database from https://my-database.now.sh/commissioniComunePalermo.db but my request is hanging. Eventually I get this error:

An error occurred with this application.

NO_STATUS_CODE_FROM_FUNCTION

That's another datasette-publish-now bug. I'm going to move this issue to that repo.

Originally posted by @simonw in https://github.com/simonw/datasette-publish-now/issues/22#issuecomment-620207580

simonw commented 4 years ago

Since there's a hard upper limit on the response from a Vercel function it may be that this can't be supported.

Or... maybe I need to publish the actual database file as a static resource somehow?

If I can't get it to work then deploys should go live with allow_download set to False.

falkben commented 2 years ago

I'm just wondering if there's an update of the status on this issue.

I am having a similar issue with a datasette deployment to vercel, with a relatively small database (~40 MB).

https://steam-to-sqlite.vercel.app/database.db

If seems like the lambda function ideally wouldn't be involved in serving the database file at all but perhaps there's no way around that?

I'm not really too familiar with Vercel's offerings, but wondering: would including the database file in a static directory with the static option yield a URL to the database that doesn't involve the lambda function or is the lambda function involved in serving static assets regardless?