Reset the pdo to null, so can create a fresh connection when long runnin...

...g jobs are working. There is a chance of at-least one query will get missed for the error happened. What we can do is catch the error and execute it once again setting a flag so it will not execute more than once.