How long could these submarines stay at sea?
The primary limitations were food and fuel. Other things like spare parts could become an issue, but that would have been an unusual case. Hopefully, running out of torpedoes was a good thing, assuming they hit their targets, and aren’t part of this question.
Food was loaded out for the expected duration of the patrol, up to 75 days. A few patrols went a bit over 80 days. That required creativity by the cooks and patience by the crew. The menus for the last few days would likely have been strange combinations of whatever was still left on board.
Fuel was the most frequent limitation. These submarines carried up to 110,000 gallons of diesel fuel. The question then was how efficiently it was being used. A boat may have needed to run at higher, inefficient speeds to be in a newly assigned area. A boat may have had targets make an unexpected course change and get away. In that case, the boat may choose to make a high-speed “end-around” to get in front of the targets again. These were all appropriate uses of fuel, but they were less efficient. As a result, the fuel may not have lasted as long as planned.