Put metadata in query text with JSON

Change-Id: I339dc9614ced4443c7564ef16fcccd72dd319b18
Recycle mysql connections after an hour

Change-Id: Ia6fd9278585ce6e2552d0fc2f2d270a39e659cd4