Giter VIP home page Giter VIP logo

qup's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

qup's Issues

No method error while unmarshalling

<NoMethodError: undefined method `ord' for nil:NilClass>

/usr/lib64/ruby/gems/1.8/gems/qup-1.4.0/lib/qup/adapter/kestrel/queue.rb:92:in unmarshal_if_marshalled' /usr/lib64/ruby/gems/1.8/gems/qup-1.4.0/lib/qup/adapter/kestrel/queue.rb:65:inconsume'
/usr/lib64/ruby/gems/1.8/gems/qup-1.4.0/lib/qup/consumer.rb:27:in `consume'

Fix coverage so it works correctly on 1.8 and 1.9

rcov is 1.8 only, simplecov is 1.9 only, fixup the tasks so that the appropriate one is used and the task is injected based upon what ruby version is being used at the time for development.

Coverage tools should be removed from the gemspec.

Running out of Redis sockets, what am I doing wrong?

Hello!

Thanks for qup, it looks cool. I've tried using it, but I run out of Redis sockets after a while, so I'm missing some cleanup somewhere.

I have a test repo up here with code exemplifying the problem. Just run bundle, start the worker and the app, and run ./abuse.sh, which calls curl in an endless stream of requests.

  1. The requests are published on a topic by the Sinatra app.
  2. The worker is subscribed to the topic onto which the Sinatra app dumps the requests, and each requests has a unique id.
  3. The worker parses the request and replies on a new "reply" topic, which is derived from the unique id.
  4. The Sinatra app picks up the reply, and removes the topic upon success or timeout.

My worker's output:

msgs: 19
msgs: 0
msgs: 33
msgs: 114
msgs: 106
msgs: 114
msgs: 113
msgs: 107
msgs: 110
msgs: 69
msgs: 102
msgs: 104
msgs: 102
msgs: 105
msgs: 102
msgs: 78
msgs: 93
msgs: 76
msgs: 86
msgs: 82
msgs: 79
msgs: 83
msgs: 57
msgs: 96
msgs: 96
msgs: 82
msgs: 102
msgs: 79
msgs: 100
/Users/sardaukar/.rvm/gems/ruby-2.1.5/gems/redis-3.1.0/lib/redis/connection/ruby.rb:13:in `initialize': Too many open files - socket(2) (Errno::EMFILE)
    from /Users/sardaukar/.rvm/gems/ruby-2.1.5/gems/redis-3.1.0/lib/redis/connection/ruby.rb:13:in `initialize'
    from /Users/sardaukar/.rvm/gems/ruby-2.1.5/gems/redis-3.1.0/lib/redis/connection/ruby.rb:118:in `new'
    from /Users/sardaukar/.rvm/gems/ruby-2.1.5/gems/redis-3.1.0/lib/redis/connection/ruby.rb:118:in `connect_addrinfo'
    from /Users/sardaukar/.rvm/gems/ruby-2.1.5/gems/redis-3.1.0/lib/redis/connection/ruby.rb:162:in `block in connect'
    from /Users/sardaukar/.rvm/gems/ruby-2.1.5/gems/redis-3.1.0/lib/redis/connection/ruby.rb:160:in `each'
    from /Users/sardaukar/.rvm/gems/ruby-2.1.5/gems/redis-3.1.0/lib/redis/connection/ruby.rb:160:in `each_with_index'
    from /Users/sardaukar/.rvm/gems/ruby-2.1.5/gems/redis-3.1.0/lib/redis/connection/ruby.rb:160:in `connect'
    from /Users/sardaukar/.rvm/gems/ruby-2.1.5/gems/redis-3.1.0/lib/redis/connection/ruby.rb:211:in `connect'
    from /Users/sardaukar/.rvm/gems/ruby-2.1.5/gems/redis-3.1.0/lib/redis/client.rb:304:in `establish_connection'
    from /Users/sardaukar/.rvm/gems/ruby-2.1.5/gems/redis-3.1.0/lib/redis/client.rb:85:in `block in connect'
    from /Users/sardaukar/.rvm/gems/ruby-2.1.5/gems/redis-3.1.0/lib/redis/client.rb:266:in `with_reconnect'
    from /Users/sardaukar/.rvm/gems/ruby-2.1.5/gems/redis-3.1.0/lib/redis/client.rb:84:in `connect'
    from /Users/sardaukar/.rvm/gems/ruby-2.1.5/gems/redis-3.1.0/lib/redis/client.rb:326:in `ensure_connected'
    from /Users/sardaukar/.rvm/gems/ruby-2.1.5/gems/redis-3.1.0/lib/redis/client.rb:197:in `block in process'
    from /Users/sardaukar/.rvm/gems/ruby-2.1.5/gems/redis-3.1.0/lib/redis/client.rb:279:in `logging'
    from /Users/sardaukar/.rvm/gems/ruby-2.1.5/gems/redis-3.1.0/lib/redis/client.rb:196:in `process'
    from /Users/sardaukar/.rvm/gems/ruby-2.1.5/gems/redis-3.1.0/lib/redis/client.rb:102:in `call'
    from /Users/sardaukar/.rvm/gems/ruby-2.1.5/gems/redis-3.1.0/lib/redis.rb:970:in `block in lpush'
    from /Users/sardaukar/.rvm/gems/ruby-2.1.5/gems/redis-3.1.0/lib/redis.rb:37:in `block in synchronize'
    from /Users/sardaukar/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
    from /Users/sardaukar/.rvm/gems/ruby-2.1.5/gems/redis-3.1.0/lib/redis.rb:37:in `synchronize'
    from /Users/sardaukar/.rvm/gems/ruby-2.1.5/gems/redis-3.1.0/lib/redis.rb:969:in `lpush'
    from /Users/sardaukar/.rvm/gems/ruby-2.1.5/gems/qup-1.4.1/lib/qup/adapter/redis/queue.rb:71:in `produce'
    from /Users/sardaukar/.rvm/gems/ruby-2.1.5/gems/qup-1.4.1/lib/qup/adapter/redis/topic.rb:61:in `block in publish'
    from /Users/sardaukar/.rvm/gems/ruby-2.1.5/gems/qup-1.4.1/lib/qup/adapter/redis/topic.rb:60:in `each'
    from /Users/sardaukar/.rvm/gems/ruby-2.1.5/gems/qup-1.4.1/lib/qup/adapter/redis/topic.rb:60:in `publish'
    from /Users/sardaukar/.rvm/gems/ruby-2.1.5/gems/qup-1.4.1/lib/qup/publisher.rb:27:in `publish'
    from worker.rb:22:in `block (2 levels) in '
    from /Users/sardaukar/.rvm/gems/ruby-2.1.5/gems/qup-1.4.1/lib/qup/adapter/redis/queue.rb:97:in `yield_message'
    from /Users/sardaukar/.rvm/gems/ruby-2.1.5/gems/qup-1.4.1/lib/qup/adapter/redis/queue.rb:86:in `consume'
    from /Users/sardaukar/.rvm/gems/ruby-2.1.5/gems/qup-1.4.1/lib/qup/consumer.rb:27:in `consume'
    from worker.rb:12:in `block in '
    from worker.rb:11:in `loop'
    from worker.rb:11:in `'

Since I'm removing the topic, I have no idea what cleanup I am missing. Thanks for any help!

Enforce 1 connection to redis for each Session

The current way the redis adapter is implemented can result in a large number of connections to redis. This should be changed to be more in line with the way the Kestrel adapter works, with 1 network connection for each Adapter instance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.