A Southern California factory town's attempt to shut down production of the popular Sriracha chili sauce is heading to court.

A Los Angeles Superior Court judge was expected to decide Thursday whether to grant the city of Irwindale's request to cease operations at the Huy (hoy) Fong Foods factory until the company can reduce the pungent smell of pepper and garlic fumes emanating from the plant.

The sprawling 650,000-square-foot factory processes some 100m pounds of peppers a year into Sriracha and two other popular Asian food sauces.

Chili peppers are loaded onto a conveyer belt for making of Sriracha chili sauce at the Huy Fong Foods factory in Irwindale, California. Photograph: Nick Ut/AP Photograph: Nick Ut/AP

The peppers get washed, mixed with garlic and a few other ingredients and roasted during this time of the year, when jalapeno peppers are harvested in central California and trucked to the 2-year-old plant. The pungent smell of peppers and garlic fumes is sent through a carbon-based filtration system that dissipates them before they leave the building, but not nearly enough say residents.

They complained the odor gives them headaches, burn their throat and make their eyes water.

The Huy Fong Foods factory, maker of Sriracha hot chili sauce, is seen in Irwindale, California. Photograph: Lucy Nicholson/Reuters Photograph: LUCY NICHOLSON/REUTERS

Huy Fong executives said they were cooperating with the city to reduce the smell, but balked at the city's suggestion of putting in a new, $600,000 filtration system that may not be necessary.

The company said it was looking into other alternatives when the city sued.

Sriracha's little plastic squeeze bottles with their distinctive green caps are ubiquitous in restaurants and home pantries around the world.

Company founder David Tran said his privately held business took in about $85m last year.