question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Moto server hangs with the latest version of werkzeug (v2.2.1)

See original GitHub issue

Here is what I do:

mamba env create -n test-moto  # this creates a clean environment.
conda activate test-moto
pip install moto  # OR mamba install moto -c conda-forge
moto_server -p 5555

then in a different terminal I run

curl "http://localhost:5555/"

Expected behavior: The curl should immediately return a result.

Actual behavior: The moto_server hangs. The process is at 100% CPU usage so maybe it is busy waiting for something (just a guess).

If werkzeug is manually downgraded to v2.1.0 (pip install Werkzeug=2.1.0) or previous everything works as expected.

Here is my complete pip freeze:

-- edit by @bblommers - removed to clean the thread a bit

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:24 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
bblommerscommented, Aug 5, 2022

The breakage of werkzeug was a combination of things - werkzeug introduced some bugs, and also exposed some bugs in Moto. The upcoming werkzeug==2.2.2 release should at least stop Moto from hanging, but will still throw 404’s for some calls to Moto.

For now, Moto has pinned the werkzeug-dependency to < 2.2.x until we have time to resolve this completely.

As a debugging note: Some of Moto’s issues can be solved by setting the attribute RegexConverter.part_isolating = False. This will also cause other services to fail, as we only want this attribute for specific services - so we need to find a way to make this service-specific.

2reactions
bblommerscommented, Oct 17, 2022

There’s no date planned @jakirkham, but somewhere this week. I’d like to wait until we get some positive feedback that the dev-version works as expected… (hint, hint) 🙂

Read more comments on GitHub >

github_iconTop Results From Across the Web

Changes — Werkzeug Documentation (2.2.x)
Version 2.1.2¶. Released 2022-04-28. The development server does not set Transfer-Encoding: chunked for 1xx, 204, 304, and HEAD responses.
Read more >
Release Notes — Airflow Documentation
ExternalTaskSensor no longer hangs indefinitely when failed_states is set, an execute_date_fn is used, and some but not all of the dependent tasks fail....
Read more >
Untitled
Swtor imperial agent light side, Kisah merentas masa, Fresh new face permanent ... Argentina eliminatorias 2014 tabla, Eigenen wow server erstellen 2.4.3?
Read more >
Wjp - River Thames Conditions - Environment Agency - GOV.UK
New features 4.1.2, John wetenhall carnegie, Orion metallica key, Probation and parole bowling green ky, Aut'chose blogspot. Amc 20 mercado showtimes.
Read more >
LSST stack installation problem - Support
Name Version Build Channel _ipyw_jlab_nb_ext_conf 0.1.0 py37_0 ... jbig 2.1 hdba287a_0 jdcal 1.4.1 py_0 jedi 0.14.1 py37_0 jeepney 0.4.2 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found