Dear Pyomo,
We occassionally get the following bug:
And a bit more rare the following:
We create Azure C# functions running Python that use Pyomo to build the models that are sent to the Gurobi compute server. We use gurobi_direct from Pyomo. (as follows: model_solver = pyo.SolverFactory("gurobi_direct", solver_io="python", manage_env=True, options=options) )
When the bugs occur it is when 2 or more of these async functions are started in a short time period, but that is no guarantee of getting the bug.
(The Gurobi compute server cluster manager show these calls stuck in INIT status)
Can you help us? The bug message seems to suggest we will not be able to fix this ourselves ![]()
We are using Python version 3.13, Pyomo 6.10.0, azure-functions 1.24.0, python-dotenv 1.2.1.
Kind regards, Stijn
Hi Stijn,
Please see https://github.com/Pyomo/pyomo/issues/3908. We could certainly use your help diagnosing / reproducing / testing solutions.
Best,
John
From: pyomo...@googlegroups.com <pyomo...@googlegroups.com>
On Behalf Of Stijn
Sent: Wednesday, April 15, 2026 6:12 AM
To: Pyomo Forum <pyomo...@googlegroups.com>
Subject: [EXTERNAL] bug: Deadlock starting capture_output
|
You don't often get email from stijn...@gmail.com. Learn why this is important |
Dear Pyomo,
We occassionally get the following bug:
And a bit more rare the following:
We create Azure C# functions running Python that use Pyomo to build the models that are sent to the Gurobi compute server. We use gurobi_direct from Pyomo. (as follows: model_solver = pyo.SolverFactory("gurobi_direct", solver_io="python", manage_env=True, options=options) )
When the bugs occur it is when 2 or more of these async functions are started in a short time period, but that is no guarantee of getting the bug.
(The Gurobi compute server cluster manager show these calls stuck in INIT status)
Can you help us? The bug message seems to suggest we will not be able to fix this ourselves ![]()
We are using Python version 3.13, Pyomo 6.10.0, azure-functions 1.24.0, python-dotenv 1.2.1.
Kind regards, Stijn
--
You received this message because you are subscribed to the Google Groups "Pyomo Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
pyomo-forum...@googlegroups.com.
To view this discussion visit
https://groups.google.com/d/msgid/pyomo-forum/bb588622-01b0-4731-81b5-b226b5a2eac0n%40googlegroups.com.

# We would like to just set OutputFlag to turn off the console
# log, but that prevents users from using the Gurobi LogFile
# option (see #3589 / #3716). BUT just setting LogToConsole
# triggers Gurobi to write a message to the console. We will
# capture that message here:
with capture_output(capture_fd=True):
self._solver_model.setParam('LogToConsole', int(bool(self._tee)))