Firedac lost connection to MySQl Server

I am getting this error sometimes, but the client is getting it often.

Status Code 500
MySQLNativeException Lost connection to Mysql during query

Its mostly on the home page of the template for xdata client app, where it fetches the recordcount of all the tables.

I can fix that in a number of ways. But I am trying to understand whether

  • Firedac is timing out
  • Xdata is timing out
  • Mysql is taking too long (sometimes)

The Xdata server is am running on AWS EC2 Windows Server

I am also getting

402 Operation cannot be performed without assigned SelectCommand

XData is not timing out, because you are actually getting the response from it (status code 500).

Looks like your code is having issues in connecting/communications with MySQL.