Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Yesterday I stored a function in my workstation's Riak server using a request like this:

curl \
-X PUT http://localhost:8091/riak/my_functions/map_capacity \
-H 'Content-Type: application/json' \
-d @-

With a body like this:

function(v) {
  var parsed_data = JSON.parse(v.values[0].data);
  var data = {};
  data[parsed_data.style] = parsed_data.capacity;
  return [data];

Riak accepted the function. It was usable for mapreduce queries.

Since then I've turned my workstation on and off again.

Now the function is missing:

$ curl http://localhost:8091/riak/my_functions/map_capacity
not found

When I try to store anything in that key again, Riak times out with status "503 Service Unavailable":

$ curl -i \
> -X PUT http://localhost:8091/riak/my_functions/map_capacity \
> -H 'Content-Type: application/json' -d 'why are you broken?'
HTTP/1.1 503 Service Unavailable
Vary: Accept-Encoding
Server: MochiWeb/1.1 WebMachine/1.9.0 (someone had painted it blue)
Date: Mon, 30 Dec 2013 13:59:52 GMT
Content-Type: text/plain
Content-Length: 18

request timed out

I can store the function again if I use a different key name, but I want to use the name I chose already.

Is this key 'broken' in some way? How do I fix it?

I'm using Riak 1.0.2. It's very old, but it's the same version used in Seven Databases in Seven Weeks. I'll accept "upgrade" as an answer if it solves the issue.

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.