[1.2.4] Issue with memcache on Heroku platform

193 views
Skip to first unread message

Jan Muller

unread,
Mar 3, 2012, 8:59:52 AM3/3/12
to play-fr...@googlegroups.com
Hi, is anybody here, who has an app deployed on Heroku and using memcache? I have problems with connection to memcache servers. My configurtaion is following:

%dev-remote.memcached=enabled
%dev-remote.memcached.host=mc10.ec2.northscale.net:80
%dev-remote.memcached.user=app3089238%40heroku.com
%dev-remote.memcached.password=some_password

I copied the auth data in exact form as they gave to me. I had to add explicitely port 80 to host line, because without it, play threws Exception. But still, it is not working

My log:

2012-03-03T13:50:27+00:00 app[web.1]: 13:50:27,259 INFO  ~ Reconnecting due to exception on {QA sa=mc10.ec2.northscale.net/10.82.53.92:80, #
Rops=0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=1}
2012-03-03T13:50:27+00:00 app[web.1]: java.io.IOException: Disconnected unexpected, will reconnect.
2012-03-03T13:50:27+00:00 app[web.1]:   at net.spy.memcached.MemcachedConnection.handleReads(MemcachedConnection.java:383)
2012-03-03T13:50:27+00:00 app[web.1]:   at net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:324)
2012-03-03T13:50:27+00:00 app[web.1]:   at net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:199)
2012-03-03T13:50:27+00:00 app[web.1]:   at net.spy.memcached.MemcachedClient.run(MemcachedClient.java:1622)
2012-03-03T13:50:27+00:00 app[web.1]: 13:50:27,259 WARN  ~ Closing, and reopening {QA sa=mc10.ec2.northscale.net/10.82.53.92:80, #Rops=0, #W
ops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=1}, attempt 0.
2012-03-03T13:50:29+00:00 app[web.1]: 13:50:29,265 INFO  ~ Reconnecting {QA sa=mc10.ec2.northscale.net/10.82.53.92:80, #Rops=0, #Wops=1, #iq
=0, topRop=null, topWop=net.spy.memcached.protocol.binary.SASLAuthOperationImpl@53d9f80, toWrite=0, interested=0}
2012-03-03T13:50:29+00:00 app[web.1]: 13:50:29,267 INFO  ~ Connection state changed for sun.nio.ch.SelectionKeyImpl@10b28f30
2012-03-03T13:50:29+00:00 app[web.1]: 13:50:29,267 WARN  ~ Incomplete authentication interrupted for node {QA sa=mc10.ec2.northscale.net/10.
82.53.92:80, #Rops=0, #Wops=1, #iq=0, topRop=null, topWop=net.spy.memcached.protocol.binary.SASLAuthOperationImpl@53d9f80, toWrite=0, intere
sted=8}
2012-03-03T13:55:29+00:00 app[web.1]: 13:55:29,377 WARN  ~ Discarding partially completed op: net.spy.memcached.protocol.binary.SASLAuthOper
ationImpl@28b6e768
2012-03-03T13:55:29+00:00 app[web.1]: 13:55:29,377 INFO  ~ Reconnecting due to exception on {QA sa=mc10.ec2.northscale.net/10.82.53.92:80, #
Rops=0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=1}
2012-03-03T13:55:29+00:00 app[web.1]: java.io.IOException: Disconnected unexpected, will reconnect.
2012-03-03T13:55:29+00:00 app[web.1]:   at net.spy.memcached.MemcachedConnection.handleReads(MemcachedConnection.java:383)
2012-03-03T13:55:29+00:00 app[web.1]:   at net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:324)
2012-03-03T13:55:29+00:00 app[web.1]:   at net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:199)
2012-03-03T13:55:29+00:00 app[web.1]:   at net.spy.memcached.MemcachedClient.run(MemcachedClient.java:1622)
2012-03-03T13:55:29+00:00 app[web.1]: 13:55:29,380 WARN  ~ Closing, and reopening {QA sa=mc10.ec2.northscale.net/10.82.53.92:80, #Rops=0, #W
ops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=1}, attempt 0.
2012-03-03T13:55:31+00:00 app[web.1]: 13:55:31,383 INFO  ~ Reconnecting {QA sa=mc10.ec2.northscale.net/10.82.53.92:80, #Rops=0, #Wops=1, #iq
=0, topRop=null, topWop=net.spy.memcached.protocol.binary.SASLAuthOperationImpl@1271ba, toWrite=0, interested=0}
2012-03-03T13:55:31+00:00 app[web.1]: 13:55:31,394 INFO  ~ Connection state changed for sun.nio.ch.SelectionKeyImpl@3ae86a5f
2012-03-03T13:55:31+00:00 app[web.1]: 13:55:31,403 WARN  ~ Incomplete authentication interrupted for node {QA sa=mc10.ec2.northscale.net/10.
82.53.92:80, #Rops=0, #Wops=1, #iq=0, topRop=null, topWop=net.spy.memcached.protocol.binary.SASLAuthOperationImpl@1271ba, toWrite=0, interes
ted=8}

Thank for help

Honza

Jan Muller

unread,
Mar 3, 2012, 10:46:51 AM3/3/12
to play-fr...@googlegroups.com
Problem solved:
%dev-remote.memcached.host=mc10.ec2.northscale.net:11211

Honza

Eltmon

unread,
Mar 17, 2012, 9:37:12 PM3/17/12
to play-fr...@googlegroups.com
Worked for me, too, thanks :)  Sometimes it's the obvious ... :)

Ron Gross

unread,
Jun 23, 2012, 6:59:41 AM6/23/12
to play-fr...@googlegroups.com
Any idea how to configure this without specifying the memcached server/user/password directly in the source code?
I know Heroku exposes this as enviornment vairables via heroku config ... can Play read these directly?

Gambo

unread,
Sep 13, 2012, 4:16:21 PM9/13/12
to play-fr...@googlegroups.com
Yes you can via:

memcached.user=${MEMCACHE_USERNAME}
...
Reply all
Reply to author
Forward
0 new messages