-
Notifications
You must be signed in to change notification settings - Fork 241
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
100% cpu usage #43
Comments
When I monitor redis I see this: 1471764750.337179 [0 172.17.0.1:43928] "LPOP" "resque:queue:queues" printed continuously and rapidly. should it not be doing this? should not setting Interval to something higher slow this process down. I have tried setting it to 5000.0 with no result. |
Setting the commandline arg to -interval works but it does not seem to be reading the settings. i.e.
|
Ahh, I think there's an issue with your |
Well I would expect that the command line -interval flag should work the same work as the way that WokerSettings do. so setting -interval 5.0 should be the same as setting WorkerSettings Interval to 5.0. However you decide to make this less confusing I would definitely say document it on the readme because the settings defined as an example, 5.0 nano seconds, don't really make much sense. |
Anyhow thank you very much for writing this. It's very useful. |
Actually even setting that to 10000000000, which is 10 seconds in nano seconds does not seem to work. So likely the problem is not just the time representation. |
Hey @etopian , I've tried to recreate this, but not able too, Could you provide a repo where this happens, and I can try to re-build your steps? |
https://github.com/etopian/goworker-example built using go version go1.6.2 linux/amd64 |
@rjrobinson posted above. |
Awesome. And the exact command line argument too please. Just so I'm covering all my bases. |
./worker -interval 5 works fine, as does ./worker -interval 1... currently the settings interval is set to 1 which is suppose to be 1 nano second, but turning it up in the settings does not help either from my experience. |
@etopian I was having the same problem and switched to the following instead of settings := goworker.WorkerSettings{
URI: "redis://localhost:6379/",
Connections: 2,
Queues: []string{"hello"},
UseNumber: true,
ExitOnComplete: false,
Concurrency: 25,
Namespace: "resque:",
IntervalFloat: 5.0,
} |
@jasonwells much thx |
@jasonwells Thank you! |
I believe that I have found the root cause to this problem. It appears that the IntervalFloat value will always override the Interval value (and by default it is 5.0). It is caused by the
This is a good example for why issue #19 is important. Using flags to configure a library that can be used as a dependency is a bad idea. |
@wuman Go team! Awesome! |
@wuman: @FrankChung contributed #46 - do you think that will fix this issue? If so, would you mind merging it in? |
When running goworker it takes up 100% cpu, meaning one cpu and pushes the server load to one, and stays there. Is this normal and expected? Can anything be done about this? This is using the example provided which is basically doing nothing, it also seems to push up the load of redis to 50% CPU and it's not doing anything. Wondering if this is normal behavior? Messing with the settings does not change anything, i.e. number of workers or polling time.
The text was updated successfully, but these errors were encountered: