Maciej Wilczyński

Results 22 comments of Maciej Wilczyński

Chiming in to note that we're experiencing the exact same issue. Weirdly enough, we're only observing the issue in a single AWS Lambda project of ours (although structlog is used...

> @mLupine thanks for contributing to the fun murder mystery! Mind sharing your versions of Python and structlog? TIA! Sure: Python 3.11.6, structlog 23.2.0 (when the problematic contextvar was added)...

> One more question (to both): is asyncio involved in those apps at all? Not at all. I also confirmed that moving all contextvars binds to a single `bind_contextvars` call...

> Does the var change if you define them in a different order? 🤔 How many do you have in total? It doesn't — and when the var is removed...

Well, arguably it did indeed fix the issue, but it did so by bringing the entire application down, so I wouldn't exactly count this one as a win 😏 ```...

Yeah, I was quite surprised to see that too. In terms of reproducibility, if we were to trust Datadog, failure rate was 100%

Disabling Datadog injection did not, unsurprisingly, help. What I've just found might, though. It turns out that in the project that shows those weird errors we had some obsolete structlog...

It did not help, I can still see those errors occurring once every few hours, still only on that poor single contextvar 😏

Hey, Getting back to the issue after a little break. > your runtime (something crazy like uWSGI?? you mentioned lambda, but is here more to it?) Not at all, just...

I've modified our handler decorator to use the `bound_contextvars` context manager so that it cleans up our custom contextvars nicely after every Lambda invocation. And yeah, it didn't help at...