added db force reconnect after N queries. hopefully this'll fix the sql timeout.