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

Errno::ECHILD: No child processes error when starting SolidQueue with rake solid_queue:start #298

Closed
BrijeshSajeev opened this issue Aug 24, 2024 · 13 comments · Fixed by #299

Comments

@BrijeshSajeev
Copy link

BrijeshSajeev commented Aug 24, 2024

When attempting to start SolidQueue using bundle exec rake solid_queue:start, an Errno::ECHILD: No child processes error is raised. The error occurs during the waitpid2 system call within the reap_and_replace_terminated_forks method in the fork_supervisor.rb file. This seems to indicate an issue with handling child processes in the forking supervisor.

Environment

  • Ruby Version: 3.1.6
    
  • Rails Version: 7.1.0
    
  • SolidQueue Version: 0.5.0
    
  • RVM/Gemset: ruby-3.1.6@rg_rails_7-rb-3.1.6
    
@BrijeshSajeev
Copy link
Author

Screenshot from 2024-08-24 18-23-54

@rosa
Copy link
Member

rosa commented Aug 24, 2024

Huh, this is very strange. Could you share a bit more about your setup? Or the full log since it starts until it triggers that error? At that point it should have forked some process so there should be at least a child process... I wonder if there's no configuration at all and no forks are being created... I might not be handling this case well 🤔

@BrijeshSajeev
Copy link
Author

image

Set Up :

  • OS: Ubuntu 22.04.4 LTS x86_64
  • Ruby Version: 3.1.6
  • Rails Version: 7.1.0
  • SolidQueue Version: 0.5.0

@rosa
Copy link
Member

rosa commented Aug 24, 2024

And could you share your solid queue configuration as well?

@BrijeshSajeev
Copy link
Author

BrijeshSajeev commented Aug 24, 2024

sure thing
image

@rosa
Copy link
Member

rosa commented Aug 24, 2024

Thanks! And are you testing this in development environment? Or production?

@BrijeshSajeev
Copy link
Author

i'm testing this in dev, but somehow it takes the config for production

@BrijeshSajeev
Copy link
Author

BrijeshSajeev commented Aug 24, 2024

image
image
I noticed that when using the following configuration in the development environment:

When I run bundle exec rake solid_queue:start, it appears to be doing nothing—no logs, no errors, no noticeable activity. The process seems to hang without any feedback. This might indicate that no child processes are being forked or that the configuration isn’t being handled as expected.

Let me know if you need any additional details or if there's anything specific I should check!

@rosa
Copy link
Member

rosa commented Aug 24, 2024

Ok, so when you added the configuration in development above, you stopped getting the Errno::ECHILD error, right? This is something I need to handle better, when you don't have any workers or dispatchers configured at all 🤔 I'll fix that to finish gracefully, and to use the default configuration if the file is present but doesn't have any configuration for the given environment.

Now, to the second issue:

When I run bundle exec rake solid_queue:start, it appears to be doing nothing—no logs, no errors, no noticeable activity. The process seems to hang without any feedback.

By default it'll use Rails.logger to log, so you might have to check log/development.log to see if it's logging anything. Otherwise, you could add this to your development.rb environment:

config.solid_queue.logger = ActiveSupport::Logger.new(STDOUT)

And see if that shows the workers and dispatcher starting and running.

@BrijeshSajeev
Copy link
Author

yeah, it's working now
image
but something is wrong with my server
image

@rosa
Copy link
Member

rosa commented Aug 24, 2024

Hmm yes... that one is new to me... Maybe this helps?

@BrijeshSajeev
Copy link
Author

It's working fine.
Thank you so much for your quick response and for helping me out with this issue. I really appreciate your time and great talk.

@rosa
Copy link
Member

rosa commented Aug 24, 2024

Nice! 👏 So glad to hear it's working! I'll ship an improvement for the configuration problem and the Errno::ECHILD error when the configuration is empty.

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

Successfully merging a pull request may close this issue.

2 participants