Why are my queries in idle state?
Your session is in idle state, not the query.
Sessions that are idle are not a problem. It simply means the backend is waiting for the client to send a SQL query.
The number of sessions is a little bit on the high side though. You will need to have a really powerful server to cope with that, once all of them start doing something.
Sessions that are idle in transaction would be a problem if they stayed in that state for too long. That's what the idle_in_transaction_session_timeout handles, not &quot;idle&quot; sessions.