Logstash - JDBC input timeout error

Hi,
Logstash -version-7.6.1
I am tring to move 10 million rows from Azure SQL to Elasticsearch using logstash JDBC plugin.
I haven't set the querytimeout in the connectionstring. it should be infinitie. But after 10 to 15 mins, i am getting the below exception.
[2024-04-11T04:30:27,910][WARN ][logstash.inputs.jdbc ][main] Exception when executing JDBC query {:exception=>#<Sequel::DatabaseError: Java::ComMicrosoftSqlserverJdbc::SQLServerException: Connection timed out (Read failed)>}

Could you please let me know how to fix this issue?