Fixing database timeout.