Skip to content
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

Http Server: threads created in transactions increase activeCount and server will eventually stop processing requests #58

Open
marco-zi opened this issue Jan 27, 2022 · 0 comments · Fixed by #60
Assignees
Labels

Comments

@marco-zi
Copy link

We have the problem, that the http server sometimes becomes irresponsive. I tracked it down to the following:
Transactions are no longer processed if the activeCount of the TransactionManager is higher than the configured maximum (in run method of the SocketListener). If a new thread is created during a transaction, it adds to this count because its parent is the worker thread which is in the TransactionManager group. If more threads are generated, the limit can be hit although this is not representing that (too) many transactions are queued (which i believe is the idea behind the limit).
The problem can be avoided by explicitly setting the thread group of threads created during calls but i don't think anyone will be aware of the problem and do it.
I propose that activeCount in TransactionManager should not be activeCount of the ThreadGroup but the number of not idle workers (num_workers or size of workers) plus the size of the transQueue. Either by overriding the activeCount method or creating a new one.

This was referenced Apr 21, 2022
@chlarsson chlarsson linked a pull request Apr 21, 2022 that will close this issue
@chlarsson chlarsson added this to the Knopflerfish 6.2.0 milestone Apr 21, 2022
@chlarsson chlarsson added the bug label Apr 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants