40 million records is considered a large amount of data. You could try setting up an incremental load, it will reduce the amount of data to send to Azure.
Or you can think about partitioning, you can refer to this link for more information: https://learn.microsoft.com/en-us/analysis-services/tabular-models/partitions-ssas-tabular?view=asallproducts-allversions.
Regarding the loading timeout issue, you can try increasing the timeout value of the refresh operation. You can do this by modifying the refresh settings in Azure Analysis Services.
Regards
Mikey Qiao
If you're satisfied with the answer, don't forget to "Accept it," as this will help others who have similar questions to yours.