self-hosted
self-hosted copied to clipboard
uWSGI reports full listen queue
Version
22.7.0.dev0
Steps to Reproduce
- Run
./install.sh docker compose up -ddocker compose logs web
Expected Result
No uWSGI errors.
Actual Result
The web container logs contain
uWSGI listen queue of socket "127.0.0.1:46721" (fd: 3) full
It seems that uWSGI is reporting that the socket connection queue is full. This is weird for 2 reasons:
- This is a brand new instance of sentry self-hosted
- The limit is 100 connections(!)
Edit: there is some more info on the listen queue in the uWSGI docs https://uwsgi-docs.readthedocs.io/en/latest/articles/TheArtOfGracefulReloading.html#the-listen-queue
We receive 300 requests per second on average on our sentry instance and do not have a problem, probably because we're using a nginx installed on host to reverse proxy to sentry instance, so we're not hitting sentry with 300 requests directly.
I guess it's reasonable for any uWSGI instance to use a reverse proxy in front of it instead of delivering requests to it directly.
Do you think it suffices if we document this?
Yeah, I think documenting this is probably sufficient.
@aminvakil sorry for the ignorance, could you elaborate a bit more about how the nginx reverse-proxy helps in this case? Does it somehow enqueue the 300 connections and distribute them to the uWSGI instance without hitting the 100 connections limit on the uWSGI side?
@ValentinFrancois Sorry for late response.
Based your configuration nginx can keep a limited set of open connections to backend you've configured, and uses those connections to pass the traffic.
Therefore there is no need to open a new connection to backend for each new user connection.
@aminvakil you're mentioning this mechanism, right? I think I understand better now

@ValentinFrancois Exactly!
Encountering this error on M1 mac host (I think this is caused by https://github.com/unbit/uwsgi/issues/2406) Anyone managed to find a workaround?
I had this issue and what fixed it was enabling Rosetta emulation for docker for mac. I'm using a m2 macbook pro.
I'm not sure if this fixes it in all situations as my underlying issue was related to file system changes not propogating to the container but you could give it a try.
@Nekuromento