Applying timeout thread

- MySQL doesn’t support querytimeout well