SAN JOSE, Calif. — This metropolis of nearly a million residents is the third-largest city in California, home to tens of thousands of technology industry workers, as well as many thousands more struggling to get by. Yet even here, in the city that bills itself as the capital of Silicon Valley, the economic tidal wave that has swamped Detroit and other cities is lapping at the sea walls.

San Jose now spends one-fifth of its $1.1 billion general fund on pensions and retiree health care, and the amount keeps rising. To free up the money, services have been cut, libraries and community centers closed, the number of city workers trimmed, salaries reduced, and new facilities left unused for lack of staff. From potholes to home burglaries, the city’s problems are growing.

“We’re Silicon Valley, we’re not Detroit,” said Xavier Campos, a Democratic city councilman representing San Jose’s poor East Side. “It shouldn’t be happening here. We’re not the Rust Belt.”

The situation in San Jose is not anywhere near as dire as it is in Detroit or two other California cities, Stockton and San Bernardino, already in bankruptcy. But government officials and municipal bankruptcy experts across the country are watching San Jose closely because of a plan to reduce benefits — drafted by Mayor Chuck Reed, a Democrat, and passed by 70 percent of voters in a referendum last year.