Nginx: close connections that have been open for over an hour

I am using an Nginx server with Debian 11 to offer download resources.

I need to reset client connections that have been open for over an hour.

Currently, I restart the Nginx service via a cron job every hour. This method is too aggressive and closes client connections that have been open for less than an hour.

I’m looking for a solution to gracefully close connections that have been open for over an hour without affecting other open connections.

Is there any Nginx configuration to give an expiration date/time to open connections so that they close immediately after they expire?