The first cruise ship pulled into Barcelona's port at 5am. Over the next few hours, six more cruise ships – bearing names such as Liberty of the Seas and Grand Holiday – followed. On this warm Sunday last May, a record 31,000 tourists arrived by boat in Barcelona. Some were embarking or disembarking passengers, others dropped off thousands of tourists to spend a day in the Catalan capital. Estimates put the passengers' total spending at €3.5m (£2.8m) during the day; a figure that had local shopkeepers rubbing their hands in anticipation after being granted special permission to keep their shops open on a Sunday.

As thousands of tourists jammed the narrow streets of Barcelona's Gothic quarter or flooded into the famous La Sagrada Família basilica, neighbourhood associations warned that this onslaught was merely a sign of things to come. In mid-September, the world's biggest cruise ship will begin visiting Barcelona, and is expected to help bump cruise ship visitors to a new record of 58,000 in a two-day span.

While Madrid trumpets its record-breaking tourism numbers for 2013 and 2014, Barcelona is engaged in a different conversation about tourism. With the economic crisis apparently easing, the city is one of several Spanish hotspots looking for a way to manage the deluge of tourists.

Eduardo Chibás set out to capture this debate in his documentary Bye Bye Barcelona. "I don't know one resident in Barcelona that in some way doesn't feel like there's something wrong with the amount of people who come here every year," he said.

The city's 1.6 million residents have seen the number of visitors to the city skyrocket from 1.7 million in 1990 to more than 7.4 million in 2012.

The starting point for this conversation, he stressed, is not anti-tourist."We're all tourists, we like to visit other places and everyone acknowledges the fact that it creates jobs and can be a source of wealth." But left unchecked, tourism can wreak havoc.

Once a city willing to do anything to attract tourist cash, residents now worry Barcelona is a vicitm of its success. "This is not a city to live in. It's a theme park like Prague or Venice," one resident tells Chibás.

Failure to find a balance between tourists and residents, said Chibás, could erode the very charm that draws millions of foreigners to Barcelona each year. He pointed to the traditional shops that are being muscled out to make way for an ever-growing number of outlets catering to tourists. "People live in these areas. What happens when everything around you turns into commerce for tourists? Basically it stops being a place where you can live."

The most striking transformation can be found on La Rambla – a wide tree-lined boulevard where eight in every 10 pedestrians is a tourist. Gone are the bakeries, neighbourhood bars and traditional fruit and vegetable vendors . In their place, souvenirs shops and money changers sit side by side.

In Málaga, local officials have been paying close attention to Barcelona's dilemma. Previously a transit point to the Costa del Sol, in the last five years Málaga has become a tourist hub in its own right.

The number of bars and restaurants in the city centre has tripled from 200 to 600 in the last seven years, sending the number of residents in the area dropping by 10%. "We have to act now," Pedro Marín of the Observatory of Urban Environment told the Guardian. "We have to find an equilibrium so that it's not a nightmare to live in the historical centre."

His group is calling for a moratorium on any new bars or restaurants in the city centre – a call backed by residents but decried by industry associations. Failure to control the situation at this point, warns Marín, "runs the risk of turning the historical centre of Malaga into a theme park."

He cited the story of one resident who came home one Friday evening to find that a table of four was happily dining while blocking the entrance way to her apartment. The diners initially refused to move, he said, until the owner of the restaurant intervened. "One can make money but not at the cost of the life and health of the rest of us."

In Palma de Mallorca, 30 years of tourism has fuelled a frank conversation about the type of tourist the city typically attracts, said the city's deputy mayor Álvaro Gijón.

For decades, the city has marketed itself as a cheap destination. The resulting tourists, said Gijón, are those who "get drunk on the beach, drinking alcohol in front of everyone, singing like it was a permanent fiesta and throwing their glass bottles in the sand."

City officials decided it was time to take action after locals began complaining about swimsuit-clad tourists visiting the cathedral, using public transit and entering shops, he said. "We said to ourselves, we don't want this kind of tourist anymore. It wouldn't occur to us to go to Harrods in a wet bathing costume to go shopping, or to Piccadilly Circus and start singing in our swimsuits with 50 of our friends while drinking cheap alcohol out of a bucket."

Last month, the city approved a civic law that imposes steep fines of up to €600 for a raft of behaviours deemed "anti-social," including wearing bathing costumes outside the beach area, littering or jumping from one balcony to another or into swimming pools.

The crackdown on etiquette was necessary, said Gijón, as it complements a push by hoteliers to attract a different kind of clientele. "We're not a luxury destination – we don't want to be the Costa Azul," he insisted.

While trying to attract a more upmarket type of tourist is a risk, it's one local officials are willing to take, said Gijón. "We might lose the tourist that say, I'm going to Mallorca because I love to be drunk all day next to the beach. But we might get a family with two kids."

• This article was amended on 16 June to correct the official designation of La Sagrada Familia.