How to remove `[optimize] HTTP 409 Conflict: There is no active recording to write queries to.`
My current client:
6 Replies
You selected the bot's instantaneous insights. Let me compile your answer right away!
The error
Go to the Prisma Optimize dashboard, log in, and click the Start recording button before running your app. Prisma Optimize only collects and analyzes queries during an active recording session. If you run your app without starting a recording, you'll see this 409 error because there's nowhere to send the query data [Getting Started]. 2. Stop the Error:
- Always ensure a recording is active before running your app with Optimize enabled. - If you want to avoid this error during development when not actively profiling, you can disable Optimize by setting
This error is expected if you run your app without an active recording session. Start a recording in the dashboard before running your app, or disable Optimize when not in use to prevent the error. If you need more help, check the Optimize docs or reach out on Discord. 🤔 Alright, thanks for letting us know that there's still some help needed. A team member will reply to you shortly. In the meantime, please let us know any additional info, questions, or which parts of the answer may need clarification.
[optimize] HTTP 409 Conflict: There is no active recording to write queries to.
means that Prisma Optimize is trying to send query data, but there is no active recording session in the Optimize dashboard.
How to resolve:
1. Start a Recording Session:Go to the Prisma Optimize dashboard, log in, and click the Start recording button before running your app. Prisma Optimize only collects and analyzes queries during an active recording session. If you run your app without starting a recording, you'll see this 409 error because there's nowhere to send the query data [Getting Started]. 2. Stop the Error:
- Always ensure a recording is active before running your app with Optimize enabled. - If you want to avoid this error during development when not actively profiling, you can disable Optimize by setting
PRISMA_OPTIMIZE_ENABLED
to 'false'
in your environment, so the extension does not attempt to send queries [FAQ].
Summary:This error is expected if you run your app without an active recording session. Start a recording in the dashboard before running your app, or disable Optimize when not in use to prevent the error. If you need more help, check the Optimize docs or reach out on Discord. 🤔 Alright, thanks for letting us know that there's still some help needed. A team member will reply to you shortly. In the meantime, please let us know any additional info, questions, or which parts of the answer may need clarification.
Hey!
The error occurs if you try to cpature queries when recording is not started.
Are you running Prisma Optimize in your production environment?
If yes, then you shouldn't. Prisma Optimize should be used only in development environments.
@Nurul (Prisma) I am, in one specific server via an env variable. Even in a controlled production environment, is that a bad idea?
Yes, I won't recommend running it in production environment
FAQ | Prisma Postgres | Prisma Documentation
Learn about the FAQ regarding Prisma Postgres.
(This is applicable for all databases, not only Prisma Postgres)