The head of the powerful Soviet Writers' Union sent a conservative signal to this country's literary community in his opening remarks to the union's eighth congress here yesterday praising "socialist realism" and attacking some contemporary western writers and a popular, progressive Soviet novel.

In his closed Kremlin address, Georgy Markov, first secretary of the board of the Writers' Union, also sharply criticized western literary trends, saying, "It is imperialism that is cultivating the spirit of confrontation and working up the spirit of terror and lack of confidence.

"We accuse those reactionary authors in the West who praise war, cultivate brutish instincts and push man toward the choice of mean ways of existence unworthy of him," he said.

Markov, 75, suffered a breakdown 25 minutes after starting his speech, said several writers who attended the conference. He stumbled, and after declining assistance, was led from the podium in the packed auditorium. V. V. Karpov, editor of the literary journal Novy Mir, finished reading for him.

The two-hour speech, published in full in the Soviet weekly Literary Gazette today, struck Soviet literary observers as a negative omen for those expecting an early relaxation of cultural rigidity under Mikhail Gorbachev and out of step with the style of openness advocated by the new Soviet leader.

Due to the paramount role literature plays in contemporary Soviet culture, the five-day writers' congress is viewed as a bellwether for any cultural thaw under Gorbachev. With 10,000 fiction writers, poets and playwrights, and control of 86 monthly magazines and 16 newspapers, the Writers' Union wields more control over Soviet literary trends than any other force.

Some changes in the union's leadership are expected before the congress ends Saturday.

But several writers interviewed considered Markov's speech discouraging. He made three positive references to "socialist realism," the ruling influence over the Soviet arts that began under Joseph Stalin's leadership and is a buzzword for artistic conservatism here.

He described "Squirrel," a recent, highly popular novel by Soviet novelist Anatoly Kim, as "vulnerable" to criticism.

Saying Soviet writers were failing to depict communist heroes as well as they did in the past, Markov also said Soviet critics must struggle "against artistic waste that is compromising Soviet art."

Some of the signals just prior to the congress have been encouraging, however, according to a consensus of writers interviewed.

Last week, 67-year-old Culture Minister Pyotr Demichev was removed after reigning over an extended period in which film, theater and writing were largely stifled, and a flood of literary figures followed novelist Alexander Solzhenitsyn into exile in the West.

In a full-page curtain raiser to the writers' congress in Literary Gazette, prose writer V. Kaverin decried the loss of cultural impetus in the Soviet Union.

So far, Gorbachev's own remarks on the question of loosening cultural restrictions have been open to broad interpretation.

Gorbachev called for "bold, innovative thinking" and "promoting criticism and self-criticism" among authors in a speech last Friday to writers who are deputies to the country's Supreme Soviet, or parliament.

But he also stressed that writers should, above all, assist in achieving the goals of the Communist Party. "There is an acute need," he said, " . . . for works of art, which would inspire confidence of the victory of the ideas and plans of the 27th Soviet Communist Party Congress."