Typically, the timeout comes from trying to connect to the sql server. Does your connection string include all the required keywords? (For example, I have seen 'server' instead of 'host' and 'port', 'Initial Catalog' instead of 'Database') .
Also, this may help - SQL Server connection string in Appsettings.json + .net Core 3.1