Bin Name -- Wondering why we have the limitations of "Maximum 14 characters of any single byte. Double-byte characters are not allowed." for bin names?


Curious why bin names have the limitations of “Maximum 14 characters of any single byte. Double-byte characters are not allowed.”?

Unicode (double byte) for strings in middle layer and UTF-8 (multibyte) for strings in databases (to save storage) are two popular choices since long time, hence the reason to ask this question as we don’t have such limitation for namespace names or set names. Obviously this makes bin naming cryptic to keep bin names with in 14 character bounds.

Aerospike server item | limits

bin-names <= 14 characters set-names <= 63 characters namespace-names <= 31 characters


Bin-names are used for differentiating the components of the records, from a programmatic interface. We picked a size that we think allowed for enough practical variation while not overdoing the reservation;

For other boundary conditions, please see “what are the limits of…” in


Hi Wei,

I appreciate your response to my query.

This 14 char single byte limit on bin names is very limiting and it does not make much sense when unicode is the way to go in middle layer architecture since 1991 (ages gone by since then).

An application developer will now have to do special processing to keep just bin names “14 chars single byte” while everything else is unicode. One can certainly do workarounds to overcome this, no big deal in that.

I humbly request revisiting original assumptions in that regard because it is limiting.

Thanks, Deepak Jain


I humbly request also revisiting the original assumptions. I kept hitting this error message and then realising the issue. 14 characters? At least make it something like 32 or 64.


The limitations have not changed since last year and we also find it very limiting for the same arguments that have been mentioned before. It makes our software more complex and harder to reason about.


Is there any chance on increasing the bin name character limit? Using Aerospike as a transaction store for some of the messages from our partners can be tricky (to say the least).


Aerospike is schemaless. Each record is self describing. Bin name is stored on SSD with each record. The bin name allocation is 15 bytes - allows 14 characters + null termination max. If bin name length is increased, storage on SSD will go up accordingly. That may upset a lot of other folks! Wondering if you can use the map data type and use a key - value pair to get around the bin name limit and use the key string.


Thanks for the reply - This makes perfect sense.


This is a problem that has stuck us too. Bins are extremely important to our use case. That was the whole reason why I pitched for Aerospike over Redis. However, on later stages, I found out that the bin names have a 14 char limit. This has forced me to have a complex application design where actual field names are Converted to valid bin names before querying, and also vice versa during result processing. This could have been a fairly simple application.


AerospikeClient client = new AerospikeClient(“localhost”, 3000);

        WritePolicy policy = new WritePolicy();

        policy.totalTimeout = 50;

        var randNum = new Random();

        var key = new Key("test", "basicsalary", 1222);

        Bin bin = new Bin("mydest", 25555);

        client.Put(policy, key, bin);

Above is my C# code using Aerospike Server docker image and .NET core client but it also throws exception when I tried to save to database. Any thing wrongs with my codes? Any ideas? I have no idea why?


What is the error?


I am using Aerospike. I have setup Aerospike server by using Docker images. I build a .NET core C# solution and import Aerospike Client to the solution.

However I got the problem with the following code

AerospikeClient client = new AerospikeClient(“localhost”, 3000);

WritePolicy policy = new WritePolicy();

policy.totalTimeout = 50;

var key = new Key(“test”, “mytest”, “mykey”);

Bin bin = new Bin(“my”, 25555);

client.Put(policy, key, bin);

It throws the exception which is “bin name length greater than 14 characters or maximum bins exceeded”. If I changed the bin name to “mybin” then it works.

I tried to find the problem and fix it but I have no idea why.

This is the first time I use Aerospike so I might make some mistake.

I am using docker image for server, .Net core client lib and work on Windows 10


You can have upto 32K bin names -so unlikely that you are out of bin names. both “my” and “mybin” satisfy 14 character limit … so … unless there is a cut and paste error in what you have shared here vs actual code … ??


No it is my actual codes. I have no idea why it just works for mybin amd not for my :frowning:


I would comment the Bin… line out and retype in a new line - could be wrong special characters … it does not make sense.


Yeah it did not make sense for me as well so let me try it again. Thanks


It did not work and I have no idea why

        Bin bin1 = new Bin("name", "John");
        Bin bin2 = new Bin("age", 25);
        client.Put(policy, key, bin1, bin2);

        Bin bin3 = new Bin("salary", 50000);
        client.Put(policy, key, bin3);

Threw the same exception. It is very annoying.

Any ideas?



Use the aql tool and post the output of “show bins”.

$ aql
aql> show bins
aql> exit



I have found the problem. The problem was when I install the Aerospike database server by using Docker image, I have mounted the data to a persistent data that is located on my PC. I thinl I might use it wrongly or I did not creat correct writing policy so it threw that exception. When I removed that container and run again without mounting to persistent data then ot works like charm.

Cam you please explain it?

Many thanks


Since you get code 21, it could means one of the following issues:

“Bin name length greater than 14 characters, or maximum number of unique bin names are exceeded.”

Since we know “my” is less than 14 characters, then it must be the "maximum number of unique bin names. This is 32768 which is a pretty high but given that you are mounting persistent data, it may still possible to exceed that value?

From asadm, you can run “show stat like bin”

~~~~~~~~~~~~~~~~~~~~~~~test Namespace Statistics (2018-11-19 22:23:52 UTC)~~~~~~~~~~~~~~~~~~~~~~~
NODE               :   
available_bin_names:   32758               32758               32758                                
deleted_last_bin   :   0                   0                   0                                    
single-bin         :   false               false               false         

In my case, the available_bin_names is 32758 which means I used up 10 bin names already.