Bring a large pot of water to a boil. Add fourteen 1-quart jars; simmer to sterilize. Wash lids and rings in warm soapy water. Puree tomatoes in batches in a blender until smooth. Pour into a large pot. Add onions and garlic to the blender; puree until smooth. Mix into the pot. Stir olive oil, sugar, salt, oregano, and basil into the pot; bring to a boil. Stir in tomato paste. Simmer sauce, adding more tomato paste if needed, until thickened, about 2 hours. Pack sauce into hot, sterilized jars, filling to within 1/4 inch of the top. Wipe the rims of the jars with a moist paper towel to remove any food residue. Top with lids and screw on rings. Place a rack in the bottom of a large stockpot and fill halfway with water. Bring to a boil and lower jars 2 inches apart into the boiling water using a holder. Pour in more boiling water if necessary to bring the water level to at least 1 inch above the tops of the jars. Bring the water to a rolling boil, cover the pot, and process for 45 minutes. Remove the jars from the stockpot and place onto a cloth-covered or wood surface, several inches apart, until cool, at least 24 hours. Press the top of each lid with a finger, ensuring that the seal is tight (lid does not move up or down at all).