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

max_children problem #22

Closed
hgfdd opened this issue Oct 20, 2017 · 2 comments
Closed

max_children problem #22

hgfdd opened this issue Oct 20, 2017 · 2 comments

Comments

@hgfdd
Copy link

hgfdd commented Oct 20, 2017

In my case the option max_children with the value 0 doesn't work properly. After some time of work the searchd daemon is freezing and do not respond to connections. This is the part of my config file:

searchd
{
        listen                                  = 0.0.0.0:3312
        listen                                  = 0.0.0.0:9306:mysql41
        mysql_version_string    = 5.1.73
        log                                     = /usr/local/var/log/searchd.log

        query_log                       = /usr/local/var/log/query.log

        read_timeout            = 5

        workers = fork
        max_children            = 0

        pid_file                        = /usr/local/var/log/searchd.pid

        seamless_rotate         = 1

        preopen_indexes         = 1
        unlink_old                      = 1
        binlog_path = #
        attr_flush_period = 300

        mva_updates_pool = 64M

        sphinxql_state = /usr/local/var/data/sphinxql_state.sql
}

When i set max_children the exact value everything is fine.

I'm using Manticore 2.4.1 3b31a97@171017 id64-release

What is going wrong? Is it a bug or i need to specify some other options? Hope on your responce.

@tomatolog
Copy link
Contributor

workers = fork depricated long time ago, daemon uses thread worker in this case and as you set max_children = 0 daemon does not constrain incoming connection and might lead to box run out of resource.

Could you provide searchd.log there I could see event around hung time?
Could you also attach to hung daemon with gdb issue command thread apply all bt and provide its output here?

In case you do not want to constrain amount of incoming clients you might switch to worker = thread_pool and set option of max_children around 1.2 * CPU cores . This way daemon will handle all incoming connection however uses thread pool for processing up to max_children threads.

@airolg
Copy link
Contributor

airolg commented Jan 5, 2018

It is not very clear wheather you need any help or not, so I'm closing the issue for a while. You can always re-open it, if you'd have more questions. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants