Proposing novel strategies for minimization of gas flaring is currently of a great importance. Such strategies could eliminate the drawbacks of burning purge gas and even lead to higher process efficiency. Accordingly, a recovery unit based on membrane separation is proposed in the present contribution. This separation unit is aimed to remove hydrogen, carbon oxides, and methane from the purge gas. Furthermore, the recovered streams are sent to the upstream units as supplementary feeds. In this regard, the stream containing methane is sent to the steam reformer, while the hydrogen and carbon dioxide rich stream is injected into the methanol synthesis reactor. Different strategies are suggested and the best one is selected in terms of enhanced production capacities of synthesis gas and methanol. In order to implement the evaluations, a mathematical model composed of mass and heat balances is applied. Furthermore, the response surface methodology is employed to determine the optimum operating conditions. Consequently, more than 300 tons/year emission of carbon dioxide is inhibited by applying the proposed configuration. Besides, more than 4.6% increase in the methanol production capacity and about 1% decrease in the stoichiometry number of product are the advancements of system working under optimum conditions.