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

Brando exception on Heroku #44

Closed
rorygraves opened this issue Apr 20, 2016 · 21 comments
Closed

Brando exception on Heroku #44

rorygraves opened this issue Apr 20, 2016 · 21 comments

Comments

@rorygraves
Copy link

I saw there was a related Brando issue with Heroku deployment (chrisdinn/brando#64).
Is there any updates/fixes/workarounds known?

Thanks
Rory

@KarelCemus
Copy link
Owner

Do you mean this issue #29?

I could not reproduce it and as it is related to Brando, I haven't tried much. If you provide the minimal example to reproduce this issue, I might look at it.

@rorygraves
Copy link
Author

Yes I do - I see this immediately on deployment with Heroku - would you be happy with a minimal example deployable to there?

@KarelCemus
Copy link
Owner

Sure. I'll look at it.

@rorygraves
Copy link
Author

@KarelCemus This repo demonstrates the problem https://github.com/rorygraves/play-redis-heroku-issue

If I run against a local redis instance I see no problems (see readme for error and timing)

Against redisCloud on heroku it fails after 30 seconds -and errors until it runs out of memory and is killed.

@rorygraves
Copy link
Author

My guess, from reviewing the Brando code is there is a race condition (its only a guess) between the command send, enqueing the senders and responses coming back from redis. Why this triggers on heroku but not locally is anyones guess ;)

@KarelCemus
Copy link
Owner

OK, I successfully reproduced the issue. I'll look at it. Thanks for your example

@KarelCemus
Copy link
Owner

KarelCemus commented Apr 21, 2016

Thanks for you example, I narrowed the issue down and reported as Brando #67. It turned out Brando does not properly authenticate against Redis. Plus there are several subsequent issues. Please see the issue.

@chandanpasunoori
Copy link

any progress on this issue..?

I'm not able to connect to redis

val redis = system.actorOf(Redis("localhost", 6379)) 
[INFO] [08/07/2016 10:32:28.971] [redis-test-akka.actor.default-dispatcher-3] [akka://redis-test/deadLetters] Message [akka.actor.PoisonPill$] from Actor[akka://redis-test/user/$c#-932188988] to Actor[akka://redis-test/deadLetters] was not delivered. [4] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.
redis: ActorRef = Actor[akka://redis-test/user/$c#-932188988]

@KarelCemus
Copy link
Owner

Actually, this is not an issue of play-redis, it is more likely issue of the Brando connector. I tried to push the PR forward but as you can see it is still pending.

Recently, I am considering to switch to some other Redis connector as Brando does not have active support. However, the switch takes some time and requires the library picking and I was quite busy. However, it is on my roadmap.

If you (any of you) have a recommendation to a good asynchronnous Redis connector library, I'd appreciate it.

Note: I might be wrong but your provided logs does not confirm this issue, these are logged regardless it. Are you sure this is the cause?

@KarelCemus KarelCemus reopened this Aug 7, 2016
@chandanpasunoori
Copy link

yeah, I have seen Brando PR for this issue and updated artifact locally. and its working now

@chandanpasunoori
Copy link

I'm also in plan to update play-redis bando dependency to some other library.

@KarelCemus
Copy link
Owner

If you know about any other connector lib with active maintenance I'd appreciate it and switch the connector.

@chandanpasunoori
Copy link

chandanpasunoori commented Aug 7, 2016

https://github.com/etaty/rediscala

https://github.com/debasishg/scala-redis

https://github.com/scredis/scredis

these are few which are in my mind, and last one is active.

but need to evaluate

@chandanpasunoori
Copy link

I'm using Redis 3.2 and Scredis is only supporting upto 3.0.0

scredis/scredis#4

one PR is already there with this support but still not integrated

@KarelCemus
Copy link
Owner

Honestly, I don't emphasize the support of the latest version as the cache api supports quite basic commands. Furthermore, it is intended to be used more widely than just with the latest version.

However, thanks for these tips, I'll look at them

@KarelCemus
Copy link
Owner

Alright, Brando seems to be definitely inactive. I migrated play-redis to new connector library, the scredis implementation. It seems to be highly efficient and builds over Akka. Although there are not much commits recently, there are no major issues reported and it has about 200 starts (it is in two repos, old and new). The migration will be included in 1.3.0 version.

However, there is still much work to do to complete this milestone, as I would like to support collections in the next play-redis version. In consequence, I'm gonna publish 1.3.0-M1 version now. I would highly appreciate if you could test it on Heroku with AUTH command as well as in your regular environments and let me know how it works to evaluate the scredis connector. I am afraid of some internal bugs or performance issues.

For more details on migration see #64.

For more detail on 1.3.0 milestone see issues. This version besides the new connector adds several new commands.

Thanks to @etsrepo for hints on good connector lib.

@KarelCemus
Copy link
Owner

play-redis 1.3.0-M1 has been released. It is available in the maven repository and documentation is here.

I would appreciate if you could test it on Heroku and is some production applications.

@KarelCemus KarelCemus modified the milestones: 1.3.0, 1.2.1 Sep 2, 2016
@KarelCemus
Copy link
Owner

I tested it on Heroku with heroku-redis addon and it works smoothly. I consider this issue resolved in 1.3.0-M1 release.

@chandanpasunoori
Copy link

wow! thank you.
will test and update soon sorry I was inactive

@KarelCemus
Copy link
Owner

I encountered some issues with Redis Cloud addon, however I think it was due to wrong redis configuration. I was not able to connect to default database provided by this addon at REDISCLOUD_URL. I was not even able to find that default database in the addon configuration.

However, with Heroku-Redis and REDIS_URL it worked. And as this addon also has password-protected access, I think the authentication issue is resolved.

If you encounter any other issues on Heroku let me know, but I do not actively use Heroku so I might need help to reproduce the issue.

@chandanpasunoori
Copy link

I will test on Heroku, Azure, and Aws.
our production enviroment is on azure and aws

so far now dev environment is working.

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

No branches or pull requests

3 participants