-
Notifications
You must be signed in to change notification settings - Fork 124
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
silence_polling not working #198
Comments
Hey @anandbait, no, that should be all 😕 It's very strange it doesn't work for you. Looks like you're using Docker? Is it possible you didn't restart the supervisor there correctly? Or that you're looking at old logs? 😕 |
I'm experiencing the same issue and I'm also using Docker |
Hey @bronzdoc, are you making sure everything is restarted correctly? Could you share a bit more about your setup? For example, your Dockerfile? |
@rosa Yes, I have restarted the services multiple times. I have a service in my docker-compose.yml like this solid_queue:
build:
command: bundle exec rake solid_queue:start
depends_on:
- postgres
volumes:
- .:/app solid_queue version: 0.3.0 And in |
I have this as well. Logging is still present in a Kubernetes/Docker environment. |
I have similar setup as @bronzdoc @rosa Can you confirm that while we talk about "polling queries" then those are same queries which I have posted in logs or some other queries? |
Yes, it's exactly those queries that you have posted, the ones that should be silenced. Something must be broken 🤔 We did change the default from |
Oh, @namolnad, good question. Those weren't intended to be suppressed with this setting because they're not polling queries or related to polling 🤔 Perhaps the |
@rosa One more observation, I created just a new regular app and in that the queries are silenced by default as expected. |
Thanks @anandbait! That was my suspicion as well, as silencing the queries is working fine for us in several cases 😕 It's really weird that Docker would play a role here! I need to dig more. |
Ahh that makes sense re: the |
Yes, I think |
Also seeing this behavior, and not running in Docker. I do have a few different things that are plugging into the logging system that might be interfering. I'm on 0.3.0 of the gem, and I have tried both true and false for the config in my application.rb file:
And this is the logging output I'm observing:
(Running via overmind in this example but same behavior when running standalone) |
Sorted it out on my end, in my development.rb I had:
Removing that fixed things for me. As a minor note in case others are unaware, |
In my case the logs are not being shown in the container logs, however, I am able to bash the container and tail the logs there. |
I came across this today while fiddling with log configurations. Turns out if you declare the following (as recommended by the Rails guides) then you get Solid Queue polling logs regardless of what you set config.logger = Logger.new(STDOUT) However if you use config.logger = ActiveSupport::Logger.new(STDOUT) Note you can use stdout_logger = ActiveSupport::Logger.new(STDOUT)
tagged_logger = ActiveSupport::TaggedLogging.new(stdout_logger)
config.log_tags = [ :request_id ]
config.logger = tagged_logger |
Oh, that makes sense, I suppose, because |
Ahhh, you don't because Rails internally uses |
Aha, yes, it's expected. The reason is that |
added a PR for an option to silence the heartbeat logging #389. In the meantime, we're using a patch to silence these in HostedGPT: (https://github.com/AllYourBot/hostedgpt/blob/main/config/initializers/solid_queue_extension.rb)
|
I have added
config.solid_queue.silence_polling = true
in myapplication.rb
I have restarted my server after that.
But still I am getting logs as following
Is there anything else I need to do?
The text was updated successfully, but these errors were encountered: