gosexy / redis

Redis client for Go that maps the full redis command list into equivalent Go functions.
MIT License
167 stars 44 forks source link

Problem handling multiple request: Received a nil response. #44

Open rendon opened 9 years ago

rendon commented 9 years ago

I am having problems handling multiple request using a single instance of redis.Client.

Maybe is the way I'm using the client (a global instance for all requests), maybe not.

I developed a small project using the Revel framework that reproduces this problem: https://bitbucket.org/rendon/stress_redis

In the same repository I include a script upload.rb that I did use to stress the server a little bit. You can run it like so:

Term1:

> ./upload.rb 1 1000

Term 2:

> ./upload.rb 1001 2000

If nothing happens the first time, try again and with a bit of luck(?) the problem will arise.

To repeat the test you have to flush the data on Redis, or use a different range if IDs.

If you need more details please just ask :).