Near the peak of the harvest season, at least 25,000 people are out of work here in America's fruit and vegetable basket at the heart of California's rich Central Valley.

For months, this tree-shaded town has had one of the worst unemployment rates in the country: in June, the last month the cities were ranked nationally, Modesto had 19 percent joblessness and was second only to Rockford, Ill.

For most of the current recession the nation's high jobless rates have been concentrated in old manufacturing cities such as Rockford. Modesto is different. In a way, Modesto, with the jobless filling bars along Yosemite Boulevard at midday and derelicts lounging in the city's lush parks, has become a victim of its own success.

For years city officials struggled to lure the canning and food processing industry here. They persuaded voters to pass a massive bond issue in the early 1960s to improve the sewage treatment system to attract the water-hungry industry.

Now Modesto is the canning capital of the Central Valley, just as the canning industry has plunged into a serious slump from the pressure of low-wage foreign competition and the fall in food prices.

"The fruit canning business is not profitable," said Edward Miller, vice president for industrial relations and personnel at Tri/Valley Growers, makers of S&W and other brands. Tri/Valley is a farmer-owned cooperative, less concerned about profits than getting its owners' crops to consumers.

But Ogden Foods, a conglomerate with an eye for the bottom line, has reacted to the low return on its investment by closing its two Modesto plants in the last two years and putting 3,000 employes out of work.

Robert Britt, secretary-treasurer of Teamster Local 748, which represents most of Modesto's food processing workers, said his membership has dropped from 21,000 to 17,000 in three years.

While the union recently agreed to a $2-an-hour cut in what was once a $7.72 beginning hourly wage, companies like Ogden still have found it more profitable to operate their canneries in Mexico where the wages are lower. "Those plants in places like that are killing us," Britt said.

Modesto's jobless rate improved slightly in July to 17.7 percent, and may go down even further for August and September, the peak canning month, but it is not expected to drop to anywhere near the 9.9 percent unemployment rate registered in September, 1981.

Still, state employment development office manager Eldon Rowe argued, unemployment in Modesto "is not like unemployment in Flint, Mich." Many people are used to living through the winter on odd jobs and their unemployment insurance.

"The devastation isn't what you feel in a city where people have never been out of work before," said Becky McClure, who covers labor for The Modesto Bee.

Modesto's unemployment rate takes an annual roller-coaster ride, worsening as much as 10 points from the busy summer canning season to the doldrums of mid-winter.

"It's very difficult. I clean houses. I do what I can," said Judy Lemmons, 32, laid off from her job running a machine that bags walnuts.

Experienced food processing workers may make as much as $10 an hour. At peak periods they work six or even seven days a week so extra income piles up. They have learned the trick of waiting to apply for unemployment compensation so that their benefits will be based on the top weekly wages at the very end of the summer rush.

"It has become a way of life for many people, so that they do not want to work the rest of the year," after the summer crop has been processed, said Dave Kilby, executive vice president of the Modesto Chamber of Commerce. "And a lot of those out of work are also second incomes." About 65 percent of hourly wage employes at Tri/Valley Foods are women.

Such talk annoys David Snyder, 22, a maintenance worker unable to find a job now even with the canneries. He does not agree that Modesto residents can take jobless winters in stride.

"How can you do that when everybody is raising your rent, when your food and other bills are going up?" he asked.

Judy Lemmons has worked in the processing plants for several years. Her work, operating the machine that wraps walnuts at an S&W processing plant here, is a skilled position that keeps her on the job more weeks than most. But she still had no work from May to July and has just been laid off again for at least three weeks.

"I get laid off a lot of the time," said Lemmons, who must support a daughter, Erin, 5. Her husband, a mechanic, has not had regular work since November, she said. She said the regular jobless summers create an unusual crime problem. "People will break in and steal to get money for food. It's bad," she said. Her weekly unemployment check comes to $134, while on the job she is paid $250.

Unemployment money helps keep the economy going in winter. Rowe said his office paid out about $5 million in benefits in the first quarter this year.

Councilman Richard Lang said the city government and the Chamber of Commerce are attempting to attract other industries to Modesto and give it the type of resilience that keeps the unemployment rates in other Central Valley towns lower than its own.

Lang said he expects the town will profit from the gradual migration of light industry to the valley from the crowded, expensive cities of the Pacific coast.

However, life in Modesto has its advantages: the weather is warm and sunny, the schools good, and the countryside beautiful.

"I always thought it was a decent place to live," Lemmons said. "A lot of people don't like big cities."

But even if people wanted to move, "You have to have money to move on," she said, and there don't seem to be many jobs anywhere else. CAPTION: Picture, Judy Lemmons, laid off from job running a walnut-bagging machine, and her daughter, Erin. Weekly unemployment benefits come to $134, while on the job she is paid $250. By Debbie Noda for The Washington Post; Map, no caption, By Dave Cook -- The Washington Post