504 Gateway Time-out when querying Azure SQL server


I have a dashboard with 6 panels that queries Azure SQL server. When refreshing the dashboard I get on 4 of the panels a 504 Gateway Time-out, while the 2 remaining 2 panels display the data correctly. If I refresh the page the correct ones can change but I never get more than 2 simultaneously without error.

I increased the time for the connection limits at the data source settings, but it did not improve.

Any help would be appreciated.

Thank you