The growing influx of foreign tourists coming here to take advantage of the cheap dollar is threatening the capacity of U.S. consulates to serve them and has provoked retaliation by at least one country.

Lines outside the consulate in Buenos Aires stretched for blocks in recent months and touched off a riot when Argentine police moved in to apprehend professional stand-ins who reportedly were charging $100 to hold a place in the queue.

Officials at the Argentine Embassy here cite those troubles as a reason for their military government's decision to require visas of U.S. citizens visiting Argentina, starting this month. The Argentines followed the initiative of Brazil, ending the era in which Americans could travel throughout the hemisphere, except to Cuba, without visas.

The United States requires visas of all visitors except Canadians. Bahamians are also exempted, but they must fulfill requirements at least as demanding as those for a visa before being allowed in.

Increasing demand for visas has provoked some congressional consideration of a proposal to allow 90-day visits, at least by Japanese and European tourists -- who show little tendency to stay on as illegal aliens -- without a visa.

No prompt action seems likely, however, according to consular officials at the State Department.

Spokesman Bernard Fennell said consular officials expect to handle 6.3 million visa requests in the fiscal year ending Sept. 30, an increase of 21 percent over last year. Fiscal 1978 was a boom year, too, with a 20 percent increase over 1977.

According to Fennell, the number of consular officers has increased at percentages about half as high. Productivity increases, the result of electronic innovations, actually have allowed a decrease in the staffs of some major consulates in Japan and Western Europe, where issuing of visas has become routine.

"There are some posts where the staffing is adequate," satd consular official David Bloch. But he said that even the number of overseas officers authorized by Congress -- 1,803 at the start of this year -- is not maintained. Other officials said the Office of Management and Budget was responsible for keeping the total short by almost 100 positions.

In the Argentine case, according to Fennell, the unprecedented demand finally was met through overtime, sending in temporary-duty officers and foregoing the interviews with each applicant.

Before the lines dwindled, however, some would-be travelers almost certainly gave up the effort -- and the U.S. Embassy there estimates that those who did get their visas spent an average of $1,000 apiece during their visits to the United States.

Some local pecularities contributed to the Argentine demand. Inflation there is the highest in the world and the government increased the limits on duty-free goods that could be brought home just when air fares were lowered. The result was that 18,000 visas were issued in June, compared with 5,800 for June 1978.

But the demand is up worldwide, with the office in London alone expecting the issue 700,000 this year. The U.S. Travel Service expects up to 21 million visitors this calendar year, compared with 19.8 million last year.

The visitors are expected to spend up to $9 billion, a significant contribution toward reducing the U.S. balance of payments deficit.

Officials explain that the number of visitors far exceeds the number of visas issued because the visas are multiple-entry for several years, and because the total includes millions of Canadian entries.

The Latin Americans, while anxious to come, clearly are not content with the visa situation. "We insist on reciprocity," said an Argentine Embassy official after the announcement that U.S. travelers must now have a visa to visit his country.