-ERR command not allowed when used memory > 'maxmemory'

1,806 views
Skip to first unread message

Tharon

unread,
May 13, 2011, 3:03:02 PM5/13/11
to rhomobile
My app works fine until
1) the rhosync/redis server has been running for a while
-OR-
2) multiple devices are connected

I get the following debug output from the RhoSync Heroku logs when I
connect my second device:

2011-05-13T18:47:29+00:00 heroku[router]: GET rhohub-
trodriguez-5162ae92.rhosync.com/application dyno=web.1 queue=0
wait=0ms service=2141ms bytes=439
2011-05-13T18:47:29+00:00 app[web.1]: [11:47:29 AM 2011-05-13] -ERR
command not allowed when used memory > 'maxmemory'/app/.gems/gems/
redis-2.1.1/lib/redis/connection.rb:86:in `format_error_reply'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/rhosync-2.1.3/
lib/rhosync/../rhosync/store.rb:27:in `put_data'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/rhosync-2.1.3/
lib/rhosync/../rhosync/document.rb:13:in `put_data'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/rhosync-2.1.3/
lib/rhosync/../rhosync/client_sync.rb:137:in `compute_page'
2011-05-13T18:47:29+00:00 app[web.1]: [11:47:29 AM 2011-05-13] -ERR
command not allowed when used memory > 'maxmemory'/app/.gems/gems/
redis-2.1.1/lib/redis/connection.rb:86:in `format_error_reply'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/redis-2.1.1/lib/
redis/connection.rb:76:in `format_reply'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/redis-2.1.1/lib/
redis/connection.rb:71:in `read'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/redis-2.1.1/lib/
redis/client.rb:83:in `read'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/redis-2.1.1/lib/
redis/client.rb:44:in `call_pipelined'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/redis-2.1.1/lib/
redis/client.rb:44:in `initialize'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/redis-2.1.1/lib/
redis/client.rb:44:in `new'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/redis-2.1.1/lib/
redis/client.rb:44:in `call_pipelined'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/redis-2.1.1/lib/
redis/client.rb:63:in `process'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/redis-2.1.1/lib/
redis/client.rb:154:in `ensure_connected'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/redis-2.1.1/lib/
redis/client.rb:58:in `process'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/redis-2.1.1/lib/
redis/client.rb:118:in `logging'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/redis-2.1.1/lib/
redis/client.rb:57:in `process'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/redis-2.1.1/lib/
redis/client.rb:43:in `call_pipelined'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/redis-2.1.1/lib/
redis.rb:543:in `pipelined'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/rhosync-2.1.3/
lib/rhosync/../rhosync/store.rb:27:in `put_data'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/rhosync-2.1.3/
lib/rhosync/../rhosync/document.rb:13:in `put_data'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/rhosync-2.1.3/
lib/rhosync/../rhosync/client_sync.rb:137:in `compute_page'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/rhosync-2.1.3/
lib/rhosync/../rhosync/client_sync.rb:64:in `send_new_page'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/rhosync-2.1.3/
lib/rhosync/../rhosync/client_sync.rb:49:in `build_page'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/rhosync-2.1.3/
lib/rhosync/../rhosync/client_sync.rb:63:in `send_new_page'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/rhosync-2.1.3/
lib/rhosync/../rhosync/client_sync.rb:30:in `send_cud'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/rhosync-2.1.3/
lib/rhosync/server.rb:232:in `GET /application'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/rhosync-2.1.3/
lib/rhosync/server.rb:127:in `catch_all'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/rhosync-2.1.3/
lib/rhosync/server.rb:230:in `GET /application'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/sinatra-1.2.6/
lib/sinatra/base.rb:1151:in `call'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/sinatra-1.2.6/
lib/sinatra/base.rb:1151:in `compile!'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/sinatra-1.2.6/
lib/sinatra/base.rb:724:in `instance_eval'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/sinatra-1.2.6/
lib/sinatra/base.rb:724:in `route_eval'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/sinatra-1.2.6/
lib/sinatra/base.rb:708:in `route!'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/sinatra-1.2.6/
lib/sinatra/base.rb:758:in `process_route'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/sinatra-1.2.6/
lib/sinatra/base.rb:755:in `catch'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/sinatra-1.2.6/
lib/sinatra/base.rb:755:in `process_route'
2011-05-13T18:47:29+00:00 heroku[router]: GET rhohub-
trodriguez-5162ae92.rhosync.com/application dyno=web.1 queue=0
wait=0ms service=449ms bytes=439
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/sinatra-1.2.6/
lib/sinatra/base.rb:707:in `route!'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/sinatra-1.2.6/
lib/sinatra/base.rb:706:in `each'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/sinatra-1.2.6/
lib/sinatra/base.rb:706:in `route!'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/sinatra-1.2.6/
lib/sinatra/base.rb:843:in `dispatch!'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/sinatra-1.2.6/
lib/sinatra/base.rb:644:in `call!'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/sinatra-1.2.6/
lib/sinatra/base.rb:808:in `instance_eval'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/sinatra-1.2.6/
lib/sinatra/base.rb:808:in `invoke'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/sinatra-1.2.6/
lib/sinatra/base.rb:808:in `catch'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/sinatra-1.2.6/
lib/sinatra/base.rb:808:in `invoke'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/sinatra-1.2.6/
lib/sinatra/base.rb:644:in `call!'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/sinatra-1.2.6/
lib/sinatra/base.rb:629:in `call'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/rack-1.2.2/lib/
rack/static.rb:33:in `call'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/rack-1.2.2/lib/
rack/head.rb:9:in `call'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/rack-1.2.2/lib/
rack/urlmap.rb:47:in `call'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/rack-1.2.2/lib/
rack/urlmap.rb:41:in `each'
2011-05-13T18:47:29+00:00 app[web.1]: /home/heroku_rack/lib/
static_assets.rb:9:in `call'
2011-05-13T18:47:29+00:00 app[web.1]: /home/heroku_rack/lib/
date_header.rb:14:in `call'
2011-05-13T18:47:29+00:00 app[web.1]: /app/.gems/gems/rack-1.2.2/lib/
rack/builder.rb:77:in `call'
2011-05-13T18:47:29+00:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/gems/1.8/
gems/thin-1.2.6/lib/thin/connection.rb:76:in `pre_process'
2011-05-13T18:47:29+00:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/gems/1.8/
gems/thin-1.2.6/lib/thin/backends/base.rb:57:in `start'
2011-05-13T18:47:29+00:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/gems/1.8/
gems/thin-1.2.6/lib/thin/server.rb:156:in `start'
2011-05-13T18:47:29+00:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/gems/1.8/
gems/thin-1.2.6/lib/thin/controllers/controller.rb:80:in `start'
2011-05-13T18:47:29+00:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/gems/1.8/
gems/thin-1.2.6/bin/thin:6
2011-05-13T18:47:29+00:00 app[web.1]: /usr/ruby1.8.7/bin/thin:19

-------------------------------------------------------------------------------------------------
In my device logs, the error is:

I 05/13/2011 15:01:40:240 0018db28 APP| RHO serve: /
app/Settings
I 05/13/2011 15:01:40:272 0018db28 RHO SettingsController| Layout
file: /data/data/com.rhomobile.hmifortuneconferenceapprhodes/rhodata/
apps/app/layout_erb.iseq. Content size: 1352
I 05/13/2011 15:01:41:645 0018db28 APP| RHO serve: /
app/Settings/do_sync
I 05/13/2011 15:01:41:648 0018db28 Sync| addCommand:
SyncAll
I 05/13/2011 15:01:41:651 0053f830 Net| POST url:
http://127.0.0.1:59647/system/loadallsyncsources
I 05/13/2011 15:01:41:691 0053f830 Sync| Sync server
changes source ID :3
I 05/13/2011 15:01:41:691 0053f830 Sync| Pull changes
from server. Url:
http://rhohub-trodriguez-5162ae92.rhosync.com/application?client_id=bf304d2f671c451ea1b8dee1430c9087&p_size=2000&version=3&source_name=Conference
I 05/13/2011 15:01:41:691 0053f830 Net| GET url:
http://rhohub-trodriguez-5162ae92.rhosync.com/application?client_id=bf304d2f671c451ea1b8dee1430c9087&p_size=2000&version=3&source_name=Conference
I 05/13/2011 15:01:41:724 0018db28 APP| RHO serve: /
app/Settings
I 05/13/2011 15:01:41:725 0018db28 APP| Params:
{"msg"=>"Sync has been triggered."}
E 05/13/2011 15:01:42:427 0053f830 Net| Request
failed. HTTP Code: 500 returned. HTTP Response: -ERR command not
allowed when used memory > 'maxmemory'
I 05/13/2011 15:01:42:440 0053f830 Sync| ThreadQueue
blocked for 300 seconds...


Is there something wrong in my code? Is there a memory cap in the free
account so this would be easily solved by migrating the project to our
production account?

thanks!

--Tharon

Lars Burgess

unread,
May 13, 2011, 9:35:10 PM5/13/11
to rhom...@googlegroups.com
Hello,

Nothing wrong in your code, the free rhosync apps come with 5MB of storage.  We have production-level plans which include more storage, please see http://rhohub.com/pricing for information about the plans.

-Lars
--
You received this message because you are subscribed to the Google Groups "rhomobile" group.
To post to this group, send email to rhom...@googlegroups.com.
To unsubscribe from this group, send email to rhomobile+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rhomobile?hl=en.

Tharon

unread,
May 19, 2011, 10:12:06 AM5/19/11
to rhomobile
Thanks Lars!

This is good news :) I have moved our code over to a premium account,
but am still getting a similar error:

2011-05-19T13:46:55+00:00 app[web.1]: [06:46:55 AM 2011-05-19] -ERR
command not allowed when used memory > 'maxmemory'/app/.gems/gems/
redis-2.1.1/lib/redis/connection.rb:86:in `format_error_reply'
2011-05-19T13:46:55+00:00 app[web.1]: /app/.gems/gems/redis-2.1.1/lib/
redis/client.rb:57:in `process'
2011-05-19T13:46:55+00:00 app[web.1]: /app/.gems/gems/sinatra-1.2.6/
lib/sinatra/base.rb:758:in `process_route'
2011-05-19T13:46:55+00:00 app[web.1]: /app/.gems/gems/sinatra-1.2.6/
lib/sinatra/base.rb:755:in `catch'
2011-05-19T13:46:55+00:00 app[web.1]: /app/.gems/gems/sinatra-1.2.6/
lib/sinatra/base.rb:808:in `catch'
2011-05-19T13:46:55+00:00 app[web.1]: /app/.gems/gems/rack-1.2.2/lib/
rack/session/cookie.rb:37:in `call'
2011-05-19T13:46:55+00:00 app[web.1]: /usr/ruby1.8.7/bin/thin:19:in
`load'
2011-05-19T14:03:29+00:00 heroku[router]: POST rhohub-
bluesphere-2e0b962f.rhosync.com/application/clientlogin dyno=web.1
queue=0 wait=0ms service=11ms bytes=391

The data file for this is only 168kb as a JSON file in plain text, so
I'm sure it's not taking up all 500mb of space. Any ideas? The above
output is when attempting to log in from device #3.



On May 13, 9:35 pm, Lars Burgess <l...@rhomobile.com> wrote:
> Hello,
>
> Nothing wrong in your code, the free rhosync apps come with 5MB of storage. We have production-level plans which include more storage, please seehttp://rhohub.com/pricingfor information about the plans.
>
> >http://rhohub-trodriguez-5162ae92.rhosync.com/application?client_id=b...
> > I 05/13/2011 15:01:41:691 0053f830 Net| GET url:
> >http://rhohub-trodriguez-5162ae92.rhosync.com/application?client_id=b...

Lars Burgess

unread,
May 19, 2011, 12:19:37 PM5/19/11
to rhom...@googlegroups.com
Hi Tharon,

I have fixed the instance below so it should be running now with the proper redis storage.  Sorry about that!

-Lars

Tharon

unread,
Jun 27, 2011, 2:08:26 PM6/27/11
to rhomobile
Hi Lars,

We are again having the same issue as above, but this time on our
production account. The JSON document that is served up by the
webservice contains only 128kb of data, and we have an account that
should allow for 500MB. This should be generous space for this amount
of data, even with Redis' in memory data. There are currently four
devices connected to the RhoSync instance.

Let me know if you need more information!

--Tharon
> > > Nothing wrong in your code, the free rhosync apps come with 5MB of storage. We have production-level plans which include more storage, please seehttp://rhohub.com/pricingforinformation about the plans.
> ...
>
> read more »

Lars Burgess

unread,
Jun 27, 2011, 5:23:05 PM6/27/11
to rhom...@googlegroups.com
Hi Tharon, yes I will need info on the app / project name to debug it further.  Please file a support ticket from your rhohub dashboard (clicking on the "Support" link at the top).  This way you can include sensitive information in there.

Thanks,
Lars

Tharon

unread,
Jun 28, 2011, 1:59:48 PM6/28/11
to rhom...@googlegroups.com
Hi Lars, it turns out that the issue was that when I redeployed the RhoSync app, the "Live App" button was still toggled as on. However, the app only showed 10 available devices. Toggling the button back to off, then toggling it again so it showed on resolved the issue. The app now shows the correct 100 device max.

Thanks!!!
Reply all
Reply to author
Forward
0 new messages