third attempt debugging multithread mysql server connection error - added flask request decorators