首页 \ 问答 \ jedis psubscribe导致应用程序挂起(jedis psubscribe causes application to hang)

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';

相关问答

更多
  • 而不是导入/导出使用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';
  • “数据需要在流程中从星型模式转换为非规范化表格,以备报告。” 你真的在寻找一个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 ...
  • 如果您使用的是旧导出( 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 ...
  • 这完全取决于您的数据以及您是否可以识别哪些数据行是新的或更新的。 执行此操作的最佳方法是每次更改行时更新每行的最后修改日期或版本号。 如果您有这个,那么您可以简单地在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= ( ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。