Relieved some stress on the mysql server by limiting the sql calls from workers. This alleviates the too many connections error.