草庐IT

client-side-scripting

全部标签

redis.clients.jedis.exceptions.JedisConnectionException : Unexpected end of stream

我在尝试使用Jedis客户端向Redis服务器添加一些数据时出现以下错误:Unexpectedendofstream错误。发生这种情况的原因可能是什么?redis.clients.jedis.exceptions.JedisConnectionException:Unexpectedendofstream.[info]atredis.clients.util.RedisInputStream.ensureFill(RedisInputStream.java:198)[info]atredis.clients.util.RedisInputStream.readByte(RedisInp

node.js - ioredis (nodejs) : Debugging custom command with lua script

我写了一个自定义的lua脚本,这样我就可以在我的Node进程中从ioredis运行它:REDIS_CLIENT.defineCommand('my_command',{lua:fs.readFileSync(path.resolve(__dirname,'./lua_scripts/my_command.lua'),{encoding:'utf8'})});我想在我的my_commands.lua中添加打印,所以当我运行client.my_command(args)时,它将被打印到nodejs进程stdout但当我添加print"hellolua"时它没有(这是有道理的)。有没有办法将

java - 绝地武士-Redis : Does maximum number of clients increases chances of response time from Redis?

我们正在使用jedis连接到redis。我们正在寻找一些配置jedispool的见解。到目前为止,我们的池配置如下TIMEOUT=1000MAX_TOTAL_CONNECTIONS=1500MAX_IDLE=800MIN_IDLE=500MAX_WAIT_TIME_MILLIS=1000TEST_ON_BORROW=falseTEST_ON_RETURN=falseTEST_WHILE_IDLE=false服务器吞吐量约为每秒200个请求,每个请求约有50个redis命中。我的问题是,如果我增加连接的客户端数量,会有帮助吗?或者如何配置这个连接池。谢谢。 最

node.js - NodeRedis client.multi() hgetall 性能

Node版本:v7.4.0node-redis版本:v.2.6.2redis_version:2.8.4ubuntu14.042GB内存VPS实例我收到的迹象表明node_redishgetall的性能不尽如人意,但可能是我做错了什么。我有一个包含31669个元素的排序集。元素是散列键,每个散列有14个字段,大约256字节。检索哈希需要大约64秒,这似乎太慢了。该函数如下所示:functiongetAllAnnotations(){varcurrentSeconds=Math.floor((newDate()).getTime()/1000);console.log('currentS

java - vertx-redis-客户端 3.7.0 : Is it cheap to create redis client on every http request

我在我的一个项目中使用vertx-redis-client。我正在像这样创建redis客户端:privatevoidcreateRedisClient(finalHandler>redisHandler){Redis.createClient(vertx,AppSettings.REDIS_OPTIONS).connect(onConnect->{if(onConnect.succeeded()){System.out.println("Redisgotconnected");RedisredisClient=onConnect.result();redisHandler.handle

perl - ERR 错误编译脚本(新函数): user_script:2: '=' expected near 'end' , .../lib/site_perl/5.8.7/Redis.pm 第 163 行

我已经创建了基本的lua脚本来排除一个参数并打印它的值,使用redis-cli它的执行没有错误并且o/p被打印在日志文件中。$cattest.luaredis.replicate_commands()localvar=ARGV[1]print('var',var)$redis-cli--evaltest.lua,Anil$我想使用perl脚本运行lua脚本:$cateval.pl#!/usr/bin/perlusestrict;usewarnings;useRedis;my$r=Redis->new(server=>'127.0.0.1:6379',reconnect=>3,every

scripting - 使用变量 KEYS 从 Lua 调用 Redis zunionstore

我有一个lua脚本,需要在可变数量的键上调用zunionstore。我正在尝试执行以下代码:localargs=redis.call("zrange","weight",0,-1,"WITHSCORES")localr,wlocalcount=0localcmd=''fori=1,#args,2docmd=cmd..args[i]..":weight"--buildingupalistofzsetscount=count+1endredis.call("zunionstore","p2_test_set",count,cmd)重要的几行是:cmd=cmd..args[i]..":wei

python - 为什么即使我获得了所需的输出,我仍会收到此错误 "Wrong number of args calling Redis command From Lua script"

我试图执行这个lua脚本,我也得到了正确的输出。但是我不断收到WrongnumberofargscallingRediscommandFromLuascriptdefnew_get_following(self,start,count,user_id=0):script="""localenvs=redis.call('zrevrange',KEYS[1],ARGV[3],ARGV[4]);redis.call('sadd',ARGV[1],unpack(envs));localfavs=redis.call('sinter',ARGV[2],ARGV[1]);localacts=re

spring - 嵌套异常是 redis.clients.jedis.exceptions.JedisConnectionException : Could not get a resource from the pool

我已经浏览过许多链接,例如Jedis,Cannotgetjedisconnection:cannotgetresourcefrompool和CannotgetJedisconnection;Couldnotgetaresourcefromthepool,但仍然出现以下错误。我正在使用SpringBatch中的SpringDataRedis并从mysql读取数据并写入redis数据库。似乎有些连接错误。以下错误供引用。2018-07-1900:08:46DEBUGo.s.t.support.TransactionTemplate-Initiatingtransactionrollback

javascript - 使用 socket.io-client 连接到 redis 服务器,而无需用于 react native 的 Node

主要目标是在没有中间服务器的情况下在react-native中使用redispub/sub。我正在尝试找到一种解决方案来连接到网络中的redis服务器,而无需在中间安装其他服务器。由于react-native没有redis客户端,我正在尝试寻找替代方案。想看看我们是否可以使用socket.io-client连接到redis服务器。我尝试使用socket.io-redisthis.socket=SocketIOClient('http://192.168.3.1:6379');this.redisAdapter=this.socket.adapter(redisAdapter({host