timeout

Are hitless rolling updates possible on GKE with externalTrafficPolicy: Local?

倾然丶 夕夏残阳落幕 提交于 2020-05-14 02:24:06
问题 I have a GKE cluster (1.12.10-gke.17). I'm running the nginx-ingress-controller with type: LoadBalancer . I've set externalTrafficPolicy: Local to preserve the source ip. Everything works great, except during rolling updates. I have maxSurge: 1 and maxUnavailable: 0 . My problem is that during a rolling update, I start getting request timeouts. I suspect the Google load balancer is still sending requests to the node where the pod is Terminating even though the health checks are failing. This

dubbo超时异常

徘徊边缘 提交于 2020-04-29 18:11:39
dubbo超时异常 在调用dubbo服务时经常看到如下错误: Caused by: com.alibaba.dubbo.remoting.TimeoutException: Waiting server-side response timeout by scan timer. 源码分析 客户端调用远程服务时,本地会生成一个DefaultFuture,调用DefaultFuture.get()获取远程服务返回的结构,此方法获取锁,调用await方法,此时当前线程进入等待队列,此线程会有两种结果过:要么超时,抛出TimeOutException;如果被唤醒,则返回rpc的结果。 而这里的报错很明显是由于等待服务端返回结果时客户端超时异常,查看源码如下: public class DefaultFuture implements ResponseFuture { private static final Logger logger = LoggerFactory.getLogger(DefaultFuture.class); private static final Map<Long, Channel> CHANNELS = new ConcurrentHashMap<Long, Channel>(); private static final Map<Long,

Implementing execution timeout with C/C++

笑着哭i 提交于 2020-04-10 04:58:41
问题 I've been thinking about implementing an execution timeout mechanism in my code. I browsed looking for advice but all I saw is implementing execution timeouts for other programs being called, which wasn't exactly my idea. I'm working with C/C++ on Linux. What's the best way to accomplish this without using external libraries? I thought that maybe running a separate thread that upon timeout, sends a TERM signal to the process ID and then the program handles it and exits, but I don't know if it

Why does `timeout` not work with pipes?

时光怂恿深爱的人放手 提交于 2020-04-06 08:29:27
问题 The following command line call of timeout (which makes no sense, just for testing reason) does not work as expected. It waits 10 seconds and does not stop the command from working after 3 seconds. Why ? timeout 3 ls | sleep 10 回答1: What your command is doing is running timeout 3 ls and piping its output to sleep 10 . The sleep command is therefore not under the control of timeout and will always sleep for 10s. Something like this would give the desired effect. timeout 3 bash -c "ls | sleep

Why does `timeout` not work with pipes?

|▌冷眼眸甩不掉的悲伤 提交于 2020-04-06 08:28:21
问题 The following command line call of timeout (which makes no sense, just for testing reason) does not work as expected. It waits 10 seconds and does not stop the command from working after 3 seconds. Why ? timeout 3 ls | sleep 10 回答1: What your command is doing is running timeout 3 ls and piping its output to sleep 10 . The sleep command is therefore not under the control of timeout and will always sleep for 10s. Something like this would give the desired effect. timeout 3 bash -c "ls | sleep

Webhook call failed. Error: DEADLINE_EXCEEDED | Request timed out

半腔热情 提交于 2020-03-21 06:38:10
问题 I'm using ASP.Net for back-end webhook. Some of requests are executed successfully and few are receiving this error: Webhook call failed. Error: DEADLINE_EXCEEDED But when I added a slightly big operation which takes least 2 seconds to complete and responds in around 3 seconds I'm continuously receiving this error. The issue I think is only request time out. I can't speed up my response as it routes between 2-3 3rd party servers. So in someway I need to increase the response wait time in

事物、源码学习,spring-tx

邮差的信 提交于 2020-03-05 18:37:59
标签式配置,主要是标明回滚方法,超时,是否只读,以及隔离级别(不同session间事物的可见性,读取未提交,读取已提交,可重复读,序列化)及传播属性(定义了调用关系的事物传播行为 PROPAGATION_REQUIRED 支持当前事务,如果不存在 就新建一个(默认);PROPAGATION_SUPPORTS 支持当前事务,如果不存在,就不使用事务;PROPAGATION_MANDATORY 支持当前事务,如果不存在,抛出异常;PROPAGATION_REQUIRES_NEW 如果有事务存在,挂起当前事务,创建一个新的事务;PROPAGATION_NOT_SUPPORTED 以非事务方式运行,如果有事务存在,挂起当前事务;PROPAGATION_NEVER 以非事务方式运行,如果有事务存在,抛出异常;PROPAGATION_NESTED 如果当前事务存在,则嵌套事务执行) 具体实现 TransactionAspectSupport,基本原理就是读各种配置,加载对应的事物管理器,根据事物标签,处理各种传递、可见性、执行、回滚、异常等情况;事物间传递用TransactionInfo对象保留现场 protected Object invokeWithinTransaction(Method method, Class<?> targetClass, final

Java两则故障分析和常见连接超时时间

我怕爱的太早我们不能终老 提交于 2020-02-28 14:13:56
郑昀 汇总 20130309 常见现象的故障分析: 现象倒推一:Java Web应用的连接数暴增 最大的可能是,Web应用的线程调用路径中阻塞在某个远端资源上。 线程向某个远端资源发起的请求被阻塞,可能是以下原因: 连接受阻,如等待client端连接池的空闲连接,如远端服务连接数满; 响应迟迟没有返回,如数据库中的记录被“表锁”或“行锁”,如数据库有大量慢查询; 常见的连接超时时间 为了让 大家 一看到线上日志某些刚刚好的时间就能反应过来,总结如下: memcache PHP下, Memcache::connect 函数传入的 timeout 参数代表连接超时时间,单位秒。 默认值1秒 ; 注:修改此值之前请三思,过长的连接超时时间可能会导致失去所有的缓存优势。 Java下, spymemcached 里,配置 opTimeout 代表操作超时时间, 默认值2.5秒 ; xmemcahced 里,opTimeout 的定义与spy 一样, 默认值1秒 ; mysql wait_timeout:服务器关闭非交互连接之前等待活动的秒数, 默认值28800秒 (即8小时); connect_timeout:在获取链接时,等待握手的超时时间,只在登录时有效, 默认值10秒 ; innodb_lock_wait_timeout:一个 InnoDB 事务遇到一个行锁,等待的超时时间,

How to test timeout() in a rxjs pipe with jasmine-marbles

て烟熏妆下的殇ゞ 提交于 2020-02-25 13:36:38
问题 I have written a pipe that filters an input observable. In the pipe I specify a timeout with the timeout() operator to abort waiting if the expected value is not emitted by the source in time. I want to test the timeout case with jasmine-marbles, but I can't get it to work. I believe that expect(source).toBeObservable() evaluates before the source emits. see Stackblitz The pipe to be tested: source = cold('a', { a: { id: 'a' } }).pipe( timeout(500), filter((a) => false), catchError((err) => {

How to test timeout() in a rxjs pipe with jasmine-marbles

﹥>﹥吖頭↗ 提交于 2020-02-25 13:36:30
问题 I have written a pipe that filters an input observable. In the pipe I specify a timeout with the timeout() operator to abort waiting if the expected value is not emitted by the source in time. I want to test the timeout case with jasmine-marbles, but I can't get it to work. I believe that expect(source).toBeObservable() evaluates before the source emits. see Stackblitz The pipe to be tested: source = cold('a', { a: { id: 'a' } }).pipe( timeout(500), filter((a) => false), catchError((err) => {