Shared memcache not working on Nodejs

989 views
Skip to first unread message

Srikanth Kakani

unread,
Apr 17, 2017, 9:22:37 AM4/17/17
to Google App Engine
Hi,

I am trying out Shared memcache for my project (low volume right now). I am not able to connect to it with the following error:

Error when trying to fetch from memcache Error: socket timed out waiting on response. at timeoutHandler (/app/node_modules/memjs/lib/memjs/server.js:206:18) at Socket.<anonymous> (/app/node_modules/memjs/lib/memjs/server.js:225:9) at Socket.g (events.js:292:16) at emitNone (events.js:91:20) at Socket.emit (events.js:185:7) at Socket._onTimeout (net.js:342:8) at ontimeout (timers.js:365:14) at tryOnTimeout (timers.js:237:5) at Timer.listOnTimeout (timers.js:207:5

 MemJS: Server <memcache:11211> failed after (2) retries with error - socket timed out waiting on response.


Code I am connecting to memcached is from the documentation: https://cloud.google.com/appengine/docs/flexible/nodejs/using-redislabs-memcache


// Environment variables are defined in app.yaml.
let MEMCACHE_URL
= process.env.MEMCACHE_URL || '127.0.0.1:11211';

if (process.env.USE_GAE_MEMCACHE) {
  MEMCACHE_URL
= `${process.env.GAE_MEMCACHE_HOST}:${process.env.GAE_MEMCACHE_PORT}`;
}

const mc = memjs.Client.create(MEMCACHE_URL);

The memcache url I get is memcache:11211

Any help would be appreciated.

Thanks and Regards,
Srikanth

Justin Beckwith

unread,
Apr 17, 2017, 1:31:16 PM4/17/17
to google-a...@googlegroups.com, Gopal Ashok
Greetings folks,
Apologies for the confusion here.  The memcache support for App Engine flexible is currently in alpha:

You can fill out the form to get access, or take a look at the memcache support in redislabs:

Let us know if you have any questions!



--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscribe@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/03ed9267-a924-4ebe-8ff9-0682609da341%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Justin Beckwith | Google Cloud Platform | @justinbeckwith | http://jbeckwith.com

Geoffrey Arnold

unread,
Apr 17, 2017, 4:12:00 PM4/17/17
to google-a...@googlegroups.com, Gopal Ashok
Hey Justin, thanks for the pointer! Very exciting.

Is the memcache Alpha available for custom runtimes in the flexible environment?

Justin Beckwith

unread,
Apr 17, 2017, 4:14:57 PM4/17/17
to google-a...@googlegroups.com, Gopal Ashok
Yes, it should work great from custom runtimes.  

On Mon, Apr 17, 2017 at 1:07 PM, Geoffrey Arnold <geoffre...@gmail.com> wrote:
Hey Justin, thanks for the pointer! Very exciting.

Is the memcache Alpha available for custom runtimes in the flexible environment?

For more options, visit https://groups.google.com/d/optout.

Geoffrey Arnold

unread,
Apr 17, 2017, 4:25:18 PM4/17/17
to google-a...@googlegroups.com, Gopal Ashok
Awesome, just filled out the form! Looking forward to it!

Reply all
Reply to author
Forward
0 new messages