- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有两台服务器需要进行http session 集群和缓存。每台服务器都有多个需要共享 session 的节点。但是在组建集群的过程中,经常会出现每台服务器都无法获取对方服务器正确的节点名称,并显示一组随机字母和数字的情况。就像这样:
2019-11-13 00:28:32,973 信息 [org.infinispan.remoting.transport.jgroups.JGroupsTransport] ISPN000094:收到新的集群 View :[12dshost10-14444|11] (12) [12dshost10- 14444、12dhost10-27717、b5f9d81c-046d-bbc5-7de0-0fe99cce2e53、ce824896-df27-fef0-5872-857335dd9ce0、aeec4fab-e57d-2e99-3e06-834c998ee897、b 857e4c0-abe4-e989-bc4c-2ab05b60dc12,ca6a9e84-c9ca- 3fad-lf20-787539477a2f、12dshost11-28633、12dshost10-24663、12dshost10-3048、12dshost10-14948、12dshost10-47369]
本例中,“12dshost10”代表本地服务器,所有节点名称正确,“12dshost11”代表远程服务器,其他异常节点名称实际上来自< em>12dshost11”。我不知道为什么他们会变成这样。
在这种情况下,这个集群无法正常工作,当涉及到 session 缓存的过程时,这些异常节点总是在等待15秒后抛出TimeoutException。看起来与这些异常节点无法通信。在这段时间里,我所有的请求也会被阻塞,直到Exception throw。我看了infinispan的教程,但没有找到让 session 缓存异步的方法,也没有找到为什么会出现这些异常节点。有人有这样的问题吗?
这是我对 infinispan 和缓存的配置。
<infinispan>
<global>
<transport>
<properties>
<property name="configurationFile" value="cache-web-session-jgroups.xml"/>
<property name="channelLookup" value="com.wjw.aos.cache.impl.infinispan.InfinispanJGroupsChannelLookup"/>
</properties>
</transport>
<globalJmxStatistics
allowDuplicateDomains="true"
enabled="true"
jmxDomain="org.infinispan"
cacheManagerName="SampleCacheManager"/>
</global>
<default>
<clustering mode="replication">
<sync/>
</clustering>
<jmxStatistics enabled="true"/>
</default>
<namedCache name="transactional-type">
<transactional
transactionManagerLookupClass="org.infinispan.transaction.lookup.JBossStandaloneJTAManagerLookup"
syncRollbackPhase="true"
syncCommitPhase="true"
cacheStopTimeout="30000"
uselPcForAutoCommitTransactions="true"
autoCommit="true"
lockingMode="OPTIMISTIC"
useEagerLocking="true"
useSynchronization="true"
transactionMode="TRANSACTIONAL"
/>
<clustering mode="replication">
<sync/>
</clustering>
</namedCache>
</infinispan>
jgroups 的配置如下。
<config xmlns="urn:org:jgroups"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance""
xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-3.0.xsd">
<TCP loopback="true"
bind_addr="$(cache.websessions.jgroups.bind.ip)"
bind_port="$(cache.websessions.jgroups.bind.port)"
recv_buf_size="20M"
send_buf_size"640k"
discard_incompatible_packets="true"
max_bundle_size="64K"
max_bundle_timeout="2=300"
timer_type="new"
timer.min_threads="4"
timer.max_threads="10"
timer.keep_alive_time="3000"
timer.queue_max_size="500"
thread_pool.enabled="true"
thread_pool.min_threads="2"
thread_pool.max_threads="30"
thread_pool.keep_alive_time="60000"
thread_pool.queue_enabled="false"
thread_pool.queue_max_size="100"
thread_pool.rejection_policy="discard"
oob_thread_pool.min_threads="2"
oob_thread_pool.max_threads="30"
oob_thread_pool.keep_alive_time="60000"
oob_thread_pool.queue_enabled="false"
oob_thread_pool.queue_max_size="100"
oob_thread_pool.rejection_policy="discard"/>
<TCPGOSSIP initial_hosts="$(cache.websession.jgroups.members)"/>
<MERGE2 max_interval="30000" min_interval="10000"/>
<FD_SOCK/>
<FD timeout=3000" max_tries="3"/>
<VERIFY_SUSPECT timeout="1500"/>
<pbcast.NAKACK
use_mcast_xmit="false"
retransmit_timeout="300,600,1200,2400,4800"
discard_delivered_msgs="false"/>
<UNICAST2 timeout="300,600,1200"
stable_interval="5000"
max_bytes="1m"/>
<pbcast.STABLE stability_delay="500" desired_avg_gossip="5000" max_bytes="1m"/>
<pbcast.GMS print_local_addr="false" join_timeout="3000" view_bundling="true"/>
<UFC max_credits="200k" min_threshold="0.20"/>
<MFC max_credits="200k" min_threshold="0.20"/>
<FRAG2 frag_size="60000"/>
<RSVP timeout="60000" resend_interval="500" ack_on_delivery="false"/>
</config>
最佳答案
这看起来像是 Infinispan 的一个非常古老的版本。你不能考虑升级吗?
关于java - 使用 infinispan 进行 http session 集群和缓存时经常出现 TimeoutException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58891034/
我阅读了有关 JSR 107 缓存 (JCache) 的内容。 我很困惑:据我所知,每个 CPU 都管理其缓存内存(无需操作系统的任何帮助)。 那么,为什么我们需要 Java 缓存处理程序? (如果C
好吧,我是 jQuery 的新手。我一直在这里和那里搞乱一点点并习惯它。我终于明白了(它并不像某些人想象的那么难)。因此,鉴于此链接:http://jqueryui.com/sortable/#dis
我正在使用 Struts 2 和 Hibernate。我有一个简单的表,其中包含一个日期字段,用于存储有关何时发生特定操作的信息。这个日期值显示在我的 jsp 中。 我遇到的问题是hibernate更
我有点不确定这里发生了什么,但是我试图解释正在发生的事情,也许一旦我弄清楚我到底在问什么,就可能写一个更好的问题。 我刚刚安装了Varnish,对于我的请求时间来说似乎很棒。这是一个Magneto 2
解决 Project Euler 的问题后,我在论坛中发现了以下 Haskell 代码: fillRow115 minLength = cache where cache = ((map fill
我正试图找到一种方法来为我网络上的每台计算机缓存或存储某些 python 包。我看过以下解决方案: pypicache但它不再被积极开发,作者推荐 devpi,请参见此处:https://bitbuc
我想到的一个问题是可以从一开始就缓存网络套接字吗?在我的拓扑中,我在通过双 ISP 连接连接到互联网的 HAProxy 服务器后面有 2 个 Apache 服务器(带有 Google PageSpee
我很难说出不同缓存区域 (OS) 之间的区别。我想简要解释一下磁盘\缓冲区\交换\页面缓存。他们住在哪里?它们之间的主要区别是什么? 据我了解,页面缓存是主内存的一部分,用于存储从 I/O 设备获取的
1.题目 请你为最不经常使用(LFU)缓存算法设计并实现数据结构。 实现 LFUCache 类: LFUCache(int capacity) - 用数据结构的容量 capacity 初始化对象 in
1.题目 请你设计并实现一个满足 LRU (最近最少使用) 缓存 约束的数据结构。 实现 LRUCache 类: ① LRUCache(int capacity) 以正整数作为容量 capacity
我想在访问该 View 时关闭某些页面的缓存。它适用于简单查询模型对象的页面。 好像什么时候 'django.middleware.cache.FetchFromCacheMiddleware', 启
documents为 ExePackage element state Cache属性的目的是 Whether to cache the package. The default is "yes".
我知道 docker 用图层存储每个图像。如果我在一台开发服务器上有多个用户,并且每个人都在运行相同的 Dockerfile,但将镜像存储为 user1_myapp . user2 将其存储为 use
在 Codeigniter 中没有出现缓存问题几年后,我发现了一个问题。我在其他地方看到过该问题,但没有适合我的解决方案。 例如,如果我在 View 中更改一些纯 html 文本并上传新文件并按 F5
我在 Janusgraph 文档中阅读了有关 Janusgraph Cache 的内容。关于事务缓存,我几乎没有怀疑。我在我的应用程序中使用嵌入式 janusgrah 服务器。 如果我只对例如进行读取
我想知道是否有来自终端的任何命令可以用来匹配 Android Studio 中执行文件>使缓存无效/重新启动的使用。 谢谢! 最佳答案 According to a JetBrains employe
我想制作一个 python 装饰器来内存函数。例如,如果 @memoization_decorator def add(a, b, negative=False): print "Com
我经常在 jQuery 事件处理程序中使用 $(this) 并且从不缓存它。如果我愿意的话 var $this = $(this); 并且将使用变量而不是构造函数,我的代码会获得任何显着的额外性能吗?
是的,我要说实话,我不知道varnish vcl,我可以解决一些基本问题,但是我不太清楚,这就是为什么我遇到问题了。 我正在尝试通过http请求设置缓存禁止,但是该请求不能通过DNS而是通过 Varn
在 WP 站点上加载约 4000 个并发用户时遇到此问题。 这是我的配置: F5 负载均衡器 ---> Varnish 4,8 核,32 Gb RAM ---> 9 个后端,4 个核,每个 16 RA
我是一名优秀的程序员,十分优秀!