server db + thread