jedis psubscribe导致应用程序挂起(jedis psubscribe causes application to hang)
我正在使用redis 2.8.19和jedis 2.6.0
pool = new JedisPool( new JedisPoolConfig(), "ip", 6379, 0 ); System.out.println( "test2" ); Jedis jedis = pool.getResource(); jedis.psubscribe( new KeyExpiredListener(), "__key*__:*" ); pool.returnResource( jedis ); System.out.println( "test3" );
输出:
test2
当我尝试订阅频道时,应用似乎挂了。 所以我提出的问题是为什么我的应用程序因此而悬挂。
I'm using redis 2.8.19 and jedis 2.6.0
pool = new JedisPool( new JedisPoolConfig(), "ip", 6379, 0 ); System.out.println( "test2" ); Jedis jedis = pool.getResource(); jedis.psubscribe( new KeyExpiredListener(), "__key*__:*" ); pool.returnResource( jedis ); System.out.println( "test3" );
output:
test2
The app seems to hang when i try to subscribe to a channel. So the question I pose is why is my application hanging because of this.
原文:https://stackoverflow.com/questions/28504080
更新时间:2023-06-25 18:06
最满意答案
select * from v $ session where status ='ACTIVE';
select * from v$session where status = 'ACTIVE';
相关问答
更多-
Oracle Export Import(Oracle Export Import)[2023-03-17]
而不是导入/导出使用Datapump 检查Oracle GoldenGate 检查Oracle Streams Instead of import/export use Datapump check Oracle GoldenGate check Oracle Streams -
最后,使用[su oracle]来导出环境变量是不必要的,所以我只是删除了这一行: su oracle 这个过程就像一个魅力。 感谢所有帮助过的人。 In the end it's not neccesary to use the [su oracle] to make the export of the environment variables so I simply deleted the line: su oracle And the process worked like a charm. T ...
-
select * from v $ session where status ='ACTIVE'; select * from v$session where status = 'ACTIVE';
-
将导出/导入从SQL Server迁移到oracle的最佳方法(Best way to migrate export/import from SQL Server to oracle)[2022-05-23]
“数据需要在流程中从星型模式转换为非规范化表格,以备报告。” 你真的在寻找一个ETL工具。 如果您没有钱,我建议您查看开源Talend和Pentaho产品。 "The data needs to be transformed in the process from a star schema to a de-normalised table ready for reporting." You are really looking for an ETL tool. If you have no money i ... -
oracle中的多表导出(Multiple table export in oracle)[2021-10-14]
如果您使用的是旧导出( exp ),那么不需要,您需要为每个表单独导出。 这些限制显示在文档中 。 如果您正在使用数据泵( expdp ),那么您可以指定多个QUERY子句并指定每个子句也适用,再次如文档中所述。 If you're using the old export (exp) then no, you'd need to do a separate export for each table. The restrictions are shown in the documentation. If ... -
Oracle数据池导出/导入的文件只能与Oracle数据库位于同一服务器上。 如果您的PC上安装了Oracle客户端,则应该使用expdp / impdp实用程序。 只需确保从命令行调用它们,而不是从Toad调用它们。 所以,总结一下。 要将数据从一个Oracle服务器传输到另一个 从您的PC运行expdp 将转储文件从服务器复制到PC; 在你使用生成的日志文件时也可能是明智的 将转储文件从PC复制到另一台服务器 从你的电脑上运行impdp The files for the Oracle datapump ...
-
为什么不提供ruby选项作为shell脚本的参数? 例如, #!/bin/bash export ORACLE_HOME='/usr/local/oracle_client' export LD_LIBRARY_PATH='/usr/local/oracle_client/lib' ruby myscript.rb $* 显然你可能想要添加论证合理性检查等,但是这给出了这个想法。 Why not supply the ruby options as arguments to the shell ...
-
有没有办法只将新数据从sql导出到oracle?(Is there is any way to export only new data from sql to oracle? useing ssis)[2023-08-12]
这完全取决于您的数据以及您是否可以识别哪些数据行是新的或更新的。 执行此操作的最佳方法是每次更改行时更新每行的最后修改日期或版本号。 如果您有这个,那么您可以简单地在Oracle表中查找最后修改的最大数据,并从源表中导出更新的数据。 如果您没有这个,通常将所有数据提取到暂存环境中,对关键字段执行查找以查看目标数据库中缺少哪些行,然后仅将这些行加载到目标表中。 如果您无法在源表中完全识别新行,则需要将所有内容传输到SSIS进行比较。 This will depend entirely on your data ... -
调用dbms_metadata.get_ddl是一种选择。 例如 SET LONG 10000 SELECT dbms_metadata.get_ddl('TABLE', 'MY-TABLE-NAME') FROM dual; 或者,许多GUI工具(包括TOAD和企业管理器)都有DDL生成器。 Calling dbms_metadata.get_ddl is one option. e.g. SET LONG 10000 SELECT dbms_metadata.get_ddl('TABLE', ...
-
如果在tnsnames.ora文件中有两个数据库的条目,则可以指定要用作连接字符串一部分的TNS别名 : exp My_DB/MyPass@orcl2 file=dump_My_DB_20130729.dmp 假设别名设置为与SID同名,如: orcl= (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=my.host)(PORT=1521)) (CONNECT_DATA=(SID=orcl))) orcl2= (DESCRIPTION= ( ...