In petroleum refining, the problem of protecting the environment is solved in two directions: reducing refinery emissions into the atmosphere and discharge of wastewaters into bodies of water; improving the quality of the petroleum products to increase their environmental safety.