On one hand, it's thriving. Trains are carrying record crowds, packed to capacity in the morning and evening commutes, and generating unprecedented revenues. That's prompting the system to consider buying more railcars and expanding service. On the other hand, Caltrain is struggling, desperately searching for a stable source of funding so it can avoid having to cut service a year from now.

"We're trying to expand service at the same time we're preparing to possibly cut service," said Jayme Ackemann, a Caltrain spokeswoman. "It's a difficult challenge to tackle."

Ridership on Caltrain has been growing for years but has skyrocketed in the past three. Passenger service on the line started in October 1863, mostly as a way of hauling commuters from bedroom communities on the Peninsula to and from jobs in San Francisco. But today commuters head in both directions. Many young tech workers live in San Francisco and work in Palo Alto or deeper in Silicon Valley.

Riders forced to stand

For each of the past three years, Caltrain has seen an 11 percent growth in ridership. The railroad provides an average of 47,062 rides each weekday on 92 trains. During commute periods, trains are extremely crowded. Some trains regularly operate at 130 percent of capacity, meaning many people are standing.

"We're almost on the verge of being overwhelmed," said Mark Simon, a Caltrain spokesman. "We could not have anticipated this kind of growth."

Caltrain can't add more trains during the commute periods but has already put extra trains on the tracks just before and after. It plans to start promoting those trains more heavily, Simon said. It's also considering buying some used rail cars from another agency - it hasn't had a chance to see them yet - to lengthen its most-crowded trains.

"We're worried that if it gets too crowded, we could start losing customers," Simon said.

Along with the extra riders, Caltrain is also seeing higher-than-anticipated revenues from fares. This year, Simon said, the agency expects to collect about $6 million more than budgeted. The railroad's budget for the 2014 budget year, which starts July 1, is not only balanced but shows a 7 percent increase over the current spending plan.

So why the doom-and-gloom forecast for the 2015 budget year? Unlike most of the 27 other transit agencies in the Bay Area, Caltrain lacks a dedicated source of funding such as a property tax, parcel tax or sales tax.

Instead, the commuter railroad relies on voluntary funding from the transit agencies in the three counties it serves: San Francisco, San Mateo and Santa Clara. And like most transit agencies, Muni, SamTrans and Santa Clara Valley Transportation Authority have their own problems, leaving them unable or unwilling to give more money to Caltrain.

In 2011, with all three agencies reducing their contributions, Caltrain warned that it would have to slash service, running trains only during weekday commuter periods and curtailing trains to Gilroy. The Metropolitan Transportation Commission, the region's transportation planning and financing agency, helped craft a bailout deal with a variety of one-time funds, including deferred bus and train replacements in San Mateo County and an overdue payment from Santa Clara County for the purchase of the railroad right of way.

Buying time

The idea was to buy time for Caltrain to come up with a stable funding source. Simon said they've polled voters in the three counties and found support, but not enough to expect a tax measure to pass. While that's still a possibility, the agency is also looking at obtaining funding from a San Mateo County general services tax, getting cap-and-trade money from the state, supporting legislation that would lower the threshold for passing tax measures, and some "more creative options" that Simon wasn't ready to discuss.

Caltrain's electrification plans, now fully funded thanks to $700 million from the state high-speed rail bond, will help cut costs and increase capacity, Simon said. But the $1.5 billion project won't be done until 2019, and it won't solve all of the railroad's financial troubles.

"We recognize that a lot of people will think we're crying wolf," he said. "But the problems are real. It's going to take a concerted effort by a lot of people to get it done."