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

Possible bug in AWS environment #35

Closed
archasek opened this issue Jun 28, 2017 · 10 comments
Closed

Possible bug in AWS environment #35

archasek opened this issue Jun 28, 2017 · 10 comments

Comments

@archasek
Copy link

archasek commented Jun 28, 2017

Hi, I'm getting this error:

APP      | 2017-06-28 18:47: Server error: SyntaxError: Unexpected end of JSON input
APP      |     at JSON.parse (<anonymous>)
APP      |     at MemcachedStore.decryptData (/var/myapp/node_modules/connect-memcached/lib/connect-memcached.j s:180:27)
APP      |     at Object.callback (/var/myapp/node_modules/connect-memcached/lib/connect-memcached.js:85:52)
APP      |     at Client.memcached.delegateCallback (/var/myapp/node_modules/memcached/lib/memcached.js:687:12)
APP      |     at Client.rawDataReceived (/var/myapp/node_modules/memcached/lib/memcached.js:758:22)
APP      |     at Client.BufferBuffer (/var/myapp/node_modules/memcached/lib/memcached.js:678:12)
APP      |     at Socket.bowlofcurry (/var/myapp/node_modules/memcached/lib/utils.js:126:15)
APP      |     at emitOne (events.js:115:13)
APP      |     at Socket.emit (events.js:210:7)
APP      |     at addChunk (_stream_readable.js:252:12)
APP      |     at readableAddChunk (_stream_readable.js:235:13)
APP      |     at Socket.Readable.push (_stream_readable.js:197:10)
APP      |     at TCP.onread (net.js:588:20)

I added a console.log to the line 180 of lib/memcached.js and I got this:

APP      | 2017-06-28 18:50: 2323 '{"ct":"c8d2339bb4f7bb0ea299afbebb19ff312cb35b0ff04d5f3beec6d2ddc9108d43ee99cd4fec0c800f769d73fd189ebc4acbacc99b32538bd414acd672638a1de5cc910e97049427e549fcdfdfd7bb33fb14886cc6e2770001ce541fc918392b0665e0dc26427dc22cb7908b14bde65ee873181cf70971adb31bd9efc99ad2e602c464d62ea31a507b2b3c7a5193a0ac09bcfb6cad232d5eff9da5c5b41fee485b77474b8c304c9cbd503825fbab3ab554921b1d69d5313d162996979a7bfae9534bf99efffbbb690f7f549347b89a15339fccaf9b67f337b172c9c23c565df3102b6f4f5df906e648242b3b7c4141ded0ee8e684d225667af141347ac0d884b6ee85ed0554572874a8ac43b66bda63ae6603b5299e73eadc891d9ac722160e1be587e6db602add87f2faeef6c6c4ebb8a132c5bbcfe67758dd8c96fcd4e2dc2ff3d0c9952e0b58e30be75abefca3e7ed14a8650c1b5b70a7b9a4bdaf1452cc68c5e39a204f6e79507b90baeaead2667b2d399c5d1711375688e3a58dc1899c39684f2034ec65e3407aec9d62bbdd8bcc61faa9793c7fe73a09a4592ee0eec740d4b5aaa592ab2519bbb4b18c2580bb0ffafcf9ead8cd711e04c6d3c72132bbd4a11ae5caa0befeac3efe2ef32d48787f969bb05a163d706f1751dd18c714bf26411d7b717e584bf13e5573fd16b5f47345542655f2c7286f5089c4f692'
APP      | 2017-06-28 18:50: Server error: SyntaxError: Unexpected end of JSON input
APP      |     at JSON.parse (<anonymous>)
APP      |     at MemcachedStore.decryptData (/var/myapp/n
(...)

I suppose that this is somehow connected with AWS (Memcache in RDS), when I run my app locally, nothing's wrong.

@balor do you have any idea how to work it around?

Thanks

@archasek archasek changed the title Possible bug for some environments Possible bug in AWS environment Jun 28, 2017
@archasek
Copy link
Author

I decided to move to the https://github.com/liamdon/connect-memjs

@balor
Copy link
Owner

balor commented Jun 29, 2017

Hi there!
@archasek Could you post some more info about the memcached configuration? Are you using Memcached bundled with MySQL RDS or ElastiCache?

@archasek
Copy link
Author

@balor hi :)
Memcached bundled with MySQL RDS at the moment

@balor
Copy link
Owner

balor commented Jun 29, 2017

To be honest I didn't used this RDS configuration, could you post the memcached settings?

@archasek
Copy link
Author

archasek commented Jun 29, 2017

Here you go:

STAT maxbytes 67108864
STAT maxconns 1024
STAT tcpport 11211
STAT udpport 11211
STAT inter NULL
STAT verbosity 1
STAT oldest 0
STAT evictions on
STAT domain_socket NULL
STAT umask 700
STAT growth_factor 1.25
STAT chunk_size 48
STAT num_threads 4
STAT num_threads_per_udp 0
STAT stat_key_prefix :
STAT detail_enabled no
STAT allow_detailed yes
STAT reqs_per_event 20
STAT reqs_per_tap_event 50
STAT cas_enabled yes
STAT tcp_backlog 1024
STAT binding_protocol auto-negotiate
STAT auth_enabled_sasl no
STAT auth_sasl_engine none
STAT auth_required_sasl no
STAT item_size_max 1048576
STAT topkeys 0
STAT logger standard error
END

item_size_max 1048576 something with this setting?

@balor
Copy link
Owner

balor commented Jun 25, 2018

The item_size_max 1048576 means that you can store max 1MB of session store (encrypted), which is the default option for memcached and shouldn't be a problem itself. Do the use of memjs solved the case?

@jas-
Copy link
Contributor

jas- commented Feb 20, 2020

@archasek The encrypted object has been truncated. Can you confirm the contents on save?

@archasek
Copy link
Author

archasek commented Feb 20, 2020

@jas-, thanks for asking, but it's been like 2.5 years since I asked my question - I have no chance to confirm this :-). Cheers

@jas-
Copy link
Contributor

jas- commented Feb 20, 2020

@archasek ok, sorry I am just now seeing this. I thought I was watching this repo in order to help @balor support the functionality

@balor
Copy link
Owner

balor commented May 20, 2022

Due to insufficient debug data I'm closing this issue.

@balor balor closed this as completed May 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants