Most production environments are stochastic in nature, due to the randomness inherent in the production processes. One important engineering problem commonly faced by practitioners is to determine optimal engineering tolerances to be used in production. This article develops optimization models for determining tolerance sets to maximize the long-run average net profit on a production line with processing and rework stations, as well as instantaneous inspection and scrap operations. We assume that only one server works at the rework station, and the service times at the processing and rework stations are uncertain, thus, a stochastic queueing system is embedded into the manufacturing process. We also consider the trade-off between the overall production cost and the cost associated with a quality loss in the final product. Our work is the first to introduce the concept of double-tolerance sets to the tolerance design optimization literature. By comparing the proposed double-tolerance model with a single-tolerance model, we investigate the impact of different parameter settings and modeling assumptions on the optimal tolerances through numerical examples and a sensitivity analysis.