···1010import { Doc } from "./[doc_id]/Doc";
1111import { UpdateURL } from "components/UpdateURL";
1212import { v7 } from "uuid";
1313-const client = postgres(process.env.DB_URL as string);
1313+const client = postgres(process.env.DB_URL as string, { idle_timeout: 5 });
1414const db = drizzle(client);
15151616export const preferredRegion = ["sfo1"];
···4949 return { permissionToken, rights, entity, entity_set };
5050 },
5151 );
5252+ client.end();
5253 // Here i need to pass the permission token instead of the doc_id
5354 // In the replicache provider I guess I need to fetch the relevant stuff of the permission token?
5455 return (