BTW, massive uprisings in the rural areas started in the early 1917
IIRC this was due to confiscations, possibly during a year where there was already a poor harvest - I remember that several of the harvests of the period were poor. There was at least one drought in central Russia though that might have been 1915, not 1917.
Purchase of the agricultural products had to be put on a military footing (effective implementation of Prodrazverstka starting from 1914) with readiness to use military force if needed. Of course, the products must be paid for (not just confiscated as the Bolsheviks did) but at a realistic price. Surplus should be stored as a strategic reserve to be used in the case of emergency. If these warehouses are close to the big cities, the supply crisis may be diminished even with the adjustment to existing corruption.
I believe the issue here is that the government was
already intensifying their efforts to acquire more grain for the cities and the front, but they simply made a gross miscalculation about supply. Pre-war, the government thought that peasant villages had a significant degree of slack - surplus labor potential that could be efficiently reallocated to food production if conscription took most young men out of the workforce. They failed to account for the total amount of labor that was less obvious but just as necessary for subsistence farmers, meaning they assumed that labor productivity would increase during the war to compensate for the loss of young men (at their peak for physical labor, mind) to the front. Beyond that, though, when villages had many of their young men sent off to war, their overall per-person labor productivity declined as well! Not only was it a matter of having children and the elderly still needing food while being less able to labor for it, but also, basic subsistence economics meant that farms, faced with increased risk during the war, and faced with effectively-absent market incentives due to the war economy, were more likely to shift towards lower-risk but lower-surplus communal farming, and hardier but less valuable crops. Essentially, it's the age-old problem of agricultural states, where a peasantry that has no reason to engage in outside trade will retreat into subsistence autarchy, meaning surpluses must be compelled by force.
And on the matter of strategic reserves, apparently the situation was highly schizophrenic - right before the October Revolution, St. Petersburg and the Ukrainian theater apparently had about a week of reserves, but regiments in the north had little over a day, and some were beginning to starve. And of course, they carried on essentially rearranging deck chairs on the Titanic in their attempts to address the logistical imbalance by trying to solve the problem of distribution when there was really just a massive problem in supply. For a surplus to exist, it would have to be bought before the war, before conscription and disruption of internal trade lead the peasantry to retreat from the markets, and I'm not sure how that would happen, politically - who could sell the idea of an expansion to strategic grain reserves, and how would it be afforded? When it's needed, it's already too late, and when it's not needed, it's an ongoing expense to cycle old grain out before too much spoils, and new grain in to keep it full, and it's all too easy to dip into for political reasons or due to outright corruption.
For comparison, I'm more familiar with the situation in Canada, where farmers were in the middle of competing pressures, with the government talking out of one side of their mouth to exhort farmers to increase production, then turning around and sending recruitment officers around, homestead by homestead, to cajole anyone they could into volunteering. And even in a situation far less tense than Russia's, there was plenty of animosity, with urban newspapers regularly accusing farmers of growing fat off the war, and with farmers petitioning angrily against the recruitment pressure being levied against them. When conscription was introduced in late summer 1917, farming towns were granted a delay until after the harvest, and a system of local appeals boards was created to allow conscripts to plead their essential nature to the local economy, and then over the winter political demands led to a more widespread farmers exemption, and all this meant that by the time of the the Spring Offensive on the western front, less than a
third of Canada's demand for recruits could be fulfilled. In response, the government lifted exemptions in general, including more than 40,000 for military-age farmers, and soon after, a farmer's organization marched on the capital, 5000-strong, to present their grievances, and were largely rebuffed. Canada's wheat harvest declined by a full 19% from 1917 to 1918, and conscription was the biggest extenuating factor. And this is
Canada, where mechanization of agriculture was already well underway, market penetration was already high (and remained so for the course of the war), a democratic tradition existed to allow grievances to be aired without bloodshed, and military demands were an ocean away and easier to push back against.
So it's really no surprise that Russia had as hard a time as it did, in trying to adjust to a new reality of war where peasant soldiers would need to be levied for multiple years at a time - and there's no way around that for Russia, where at least 84% of the army was made up of peasants. For one example, conscription riots in 1914 in Russia were often tied to the fact that peasant conscripts were denied their promised wives' allowances (provided by law as compensation for lost labor) and were called up before the harvest, without any leave for that most crucial time of the farming calendar. Why couldn't Franz Ferdinand just get shot in October instead, and save everyone a whole lot of trouble...
In terms of my ideas for squaring the circle and letting Russia survive the war as we've seen in the TL, I'm really not sure if there's much that can be rapidly done to significantly improve the food supply situation - perhaps the best reasonable result is just a less extreme crisis, enough to keep matters from coming to a head. I suppose a marginally better civilian industrial situation and civilian logistical system would mean a bit more ability for civilian goods to get to rural consumers, and thus marginally more peasants farming for the market, but if those resources are taken from the war effort it probably has a worse effect than the loss of market incentives for food production, so I'm really not sure what could be done. Besides confiscation by force, I guess, but when news gets to the front it won't end well.
Edit - sources:
https://www.tandfonline.com/doi/full/10.1080/10611983.2017.1372983 for some statistics and examples of Russian conscription riots.
https://voxeu.org/article/russia-great-war-mobilisation-grain-and-revolution had a convincing argument for the decline in agricultural labor productivity in Russia in WWI.
http://www.journal.forces.gc.ca/vol13/no2/page57-eng.asp reviewed this for the statistics and timing of events for Canada.