-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Server keeps files open for bad clients #354
Milestone
Comments
Thanks for reporting this, I believe it now fixed in the fixes branch. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have one static file of 1188 bytes size that mosquitto should serve when a http request is made to the websocket listener. This worked reasonably well until last week. At that point it would refuse new connections, claiming "Too many files open". Checking with lsof revealed that it would keep a lot of instances to the static file open.
I managed to reproduce it fairly easy. In the .conf:
Then:
If you run lsof after each time you run of the line above, it will have one more line like:
Actually requesting the file with curl does not have the same problem. Only if you close the connection before receiving the whole file.
Tested with mosquitto/libwebsockets 1.4.8/1.7.8 and 1.4.10/1.7.9.
I'm not sure where this bug could be. I presume somewhere in
callback_http
inwebsockets.c
, but I don't know enough about either project to know where to go.I appreciate any tips on where to look to build a patch.
The text was updated successfully, but these errors were encountered: