prisma: sqlite timeout error multiple queries run one after another
Bug description
I’ve got a self contained project that runs with NextJS 12 using the API for routing and client side for updates.
I consistently get connection errors like this when the seeding happens when the app first runs, and also when doing simple multiple queries like 3 deletes in a row of different rows. It’s easy to reproduce by building this app and then generating and migrating. The seeding fails. Then, if you seed manually, all you have to do is run the app and delete the 3 note cards showing and you’ll see the errors generated.
I’m attaching a zip of the project as well as two videos. One shows no errors with 2.28 and the other with 3.5 causing the errors doing exactly the same deletes.
How to reproduce
Expected behavior
Error occurred during query execution:
ConnectorError(ConnectorError { user_facing_error: None, kind: ConnectionError(Timed out during query execution.) })
[peter-kellner-sqlite-problems-clip-99-final.zip](https://github.com/prisma/prisma/files/7550550/peter-kellner-sqlite-problems-clip-99-final.zip]
https://user-images.githubusercontent.com/241170/142082631-a97735b6-8a0d-48cf-ada0-833640191050.mp4
https://user-images.githubusercontent.com/241170/142084736-8ade24f9-5dc4-483d-828d-5bde42b3557b.mp4
https://user-images.githubusercontent.com/241170/142084736-8ade24f9-5dc4-483d-828d-5bde42b3557b.mp4
)
Prisma information
Environment & setup
- OS: MacOS
- Database: SQLite
- Node.js version: 16.5.0
Prisma Version
3.5 (see description of bug)
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 5
- Comments: 24 (9 by maintainers)
Ok, I can create the
ConnectorError(ConnectorError { user_facing_error: None, kind: ConnectionError(Timed out during query execution.) })sometimes with the newest Prisma version in the UI when one of the cards has additional attributes like being marked with the star. When I then delete multiple notes quick after each other, I get that error as well for one of those requests.It looks like your app is sending multiple HTTP queries quickly after each other or in parallel, and then when executing these queries one of them instantly fails with this error message.
Reproduction steps:
npm inpx prisma -vresetdb.shor commands from that to a) migrate database and b) seed datanpm run devOk, thanks for the details I’ll let @pantharshit00 checks this
The other part of this bug report with timeouts happening on consecutive sql deletes is the more important error that may or not be related. Please don’t close.