I’m running into an issue trying to use SQLite as a cache for my Nextjs app. It’s needed because Nextjs builds each page in a worker, so data that needs to be shared is writing to a SQLite db in <root>/data/cache.sqlite3. This cache is recreated during the build step, so it’s ok for it to be ephemeral. This works great in development but I’m running into this error when trying to access it once deployed to App Platform:
frontend | 20:59:23 > Build error occurred
frontend | 20:59:23 [Error: SQLITE_IOERR: disk I/O error] {
frontend | 20:59:23 type: 'Error',
frontend | 20:59:23 errno: 10,
frontend | 20:59:23 code: 'SQLITE_IOERR'
frontend | 20:59:23 }
Is there a preferred directory for temp files on App Platform? What could be going on here?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
So this turned out to be an issue with too many writes occurring at once. I fixed this by adding some backoff + retry logic around those writes, which resolved the issue.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.