A method of controlling sand production from an oil well, the method comprising the steps of: (a) providing a continuous output production flow from a wellhead of an oil well connected to an oil-containing reservoir, the output production flow comprising hydrocarbon-containing oil at an oil production rate and sand at a sand production rate, and the output production flow being conveyed by a pipeline from the wellhead to a facility for processing, transporting by pipeline, or storing the oil; (b) at a sand management station along the pipeline between the wellhead and the facility, passing the output production flow through a sand management system installed in the pipeline, wherein the sand management system comprises a solids separator configured to separate sand from the oil of the output production flow, wherein the sand management system has an input which receives the output production flow from the wellhead along an upstream part of the pipeline, the upstream part being upstream of the sand management system, and an oil output which outputs the oil, having sand separated therefrom, along a downstream part of the pipeline, the downstream part being downstream of the sand management system; characterised by: (c) opening a choke of the wellhead to increase the oil production rate and sand production rate, whereby the sand production rate is increased to a level higher than an allowable sand rate which is a predetermined maximum threshold sand production rate of the pipeline, and, at least during a time period when the sand production rate is higher than the allowable sand rate, continuously or continually separating sand in the output production flow from the oil of the output production flow using the solids separator of the sand management system to provide a zero or non-zero reduced sand flow in the downstream part of the pipeline; (d) after or during step c), measuring sand flow in at least one of the sand management system and the downstream part of the pipeline to provide a reduced sand flow rate, which is a flow rate of the reduced sand flow, in the downstream part of the pipeline; (e) comparing the reduced sand flow rate with the allowable sand rate to provide a sand rate comparison value; and (f) controlling the oil production rate using the sand rate comparison value to maintain the reduced sand flow rate in the downstream part of the pipeline below the allowable sand rate. (a) providing a continuous output production flow from a wellhead of an oil well connected to an oil-containing reservoir, the output production flow comprising hydrocarbon-containing oil at an oil production rate and sand at a sand production rate, and the output production flow being conveyed by a pipeline from the wellhead to a facility for processing, transporting by pipeline, or storing the oil; (b) at a sand management station along the pipeline between the wellhead and the facility, passing the output production flow through a sand management system installed in the pipeline, wherein the sand management system comprises a solids separator configured to separate sand from the oil of the output production flow, wherein the sand management system has an input which receives the output production flow from the wellhead along an upstream part of the pipeline, the upstream part being upstream of the sand management system, and an oil output which outputs the oil, having sand separated therefrom, along a downstream part of the pipeline, the downstream part being downstream of the sand management system; (c) opening a choke of the wellhead to increase the oil production rate and sand production rate, whereby the sand production rate is increased to a level higher than an allowable sand rate which is a predetermined maximum threshold sand production rate of the pipeline, and, at least during a time period when the sand production rate is higher than the allowable sand rate, continuously or continually separating sand in the output production flow from the oil of the output production flow using the solids separator of the sand management system to provide a zero or non-zero reduced sand flow in the downstream part of the pipeline; (d) after or during step c), measuring sand flow in at least one of the sand management system and the downstream part of the pipeline to provide a reduced sand flow rate, which is a flow rate of the reduced sand flow, in the downstream part of the pipeline; (e) comparing the reduced sand flow rate with the allowable sand rate to provide a sand rate comparison value; and (f) controlling the oil production rate using the sand rate comparison value to maintain the reduced sand flow rate in the downstream part of the pipeline below the allowable sand rate.