memset(rpc, 0, sizeof(struct rpc_context));
rpc->magic = RPC_CONTEXT_MAGIC;
- rpc->encodebuflen = 65536;
+
+ /* Allow 1M of data (for writes) and some */
+ rpc->encodebuflen = 1024 * 1024 + 4096;
rpc->encodebuf = malloc(rpc->encodebuflen);
if (rpc->encodebuf == NULL) {
free(rpc);