当前位置:网站首页>Varnish 503 no backend connection – varnish health check
Varnish 503 no backend connection – varnish health check
2022-06-29 20:59:00 【Brother Xing plays with the clouds】
varnish It will appear after a period of time after opening 503 error , Direct access to the backend OK, front end ping Back end OK, as a result of varnish Judge that the back end has hung up , Refuse request . In the configuration backend when , Configured with .prob, The configuration is as follows :
.probe= { .url = "/"; .timeout = 1s; .interval = 10m; .window = 10; .threshold = 8; .expected_response = 200; } Back end :nginx,php,yii frame ,url rewrite The request is forwarded to the backend "/" On , after yii route , The last request address is /site/index, That is, request SiteController Medium actionIndex, I haven't joined in the project yet SiteController, So back end to front end 404, And .expected_response = 200 atypism , When varnish After several retries, it will be judged that the backend is hung . Therefore, it is recommended to add a varnish Special test files , Such as .probe= { .url = "/varnishTest"; .timeout = 1s; .interval = 10m; .window = 10; .threshold = 8; .expected_response = 200; } When varnish It will be requested when it is detected /varnishTest, after yii route , Get the requested address /varnishTest/index, It will return to 200, The problem is solved . To prevent users from directly accessing varnish Dedicated test address , Can be in varnish Add... To the request set req.http.FromVarnish = "yes";, That is to say header Add a variable to , stay PHP Medium test <?php if ( isset($_SERVER['FromVarnish']) && $_SERVER['FromVarnish'] === 'yes' ){ echo 'yes'; }else { header("HTTP/1.1 404 Not Found");exit; }
边栏推荐
- 如何从外表判断导电滑环的质量
- 实现inotify配合rsync实时备份
- Mysql Json 数据类型&函数
- leetcode:724. Find the central subscript of the array
- 炒股开户请问哪个券商佣金是最低最安全的
- 「运维有小邓」Active Directory 密码过期通知功能
- Advances in computational imaging
- [cloud native practice] kubesphere practice - Multi tenant system practice
- 管理人员应具备的基本素质
- Leading by 11%, Huawei cloud sky chip AI solver once again topped the international authoritative list
猜你喜欢

Calibration, correction and world coordinate calculation of binocular stereo vision camera (openCV)
![[a must for reptiles - > scrapy framework from black iron to king] first chapter - detailed explanation of 10000 character blog posts (recommended Collection)](/img/f3/a45fc96054e42725e491c3599c527f.jpg)
[a must for reptiles - > scrapy framework from black iron to king] first chapter - detailed explanation of 10000 character blog posts (recommended Collection)

Exit operation in project
![[today in history] June 29: SGI and MIPS merged; Microsoft acquires PowerPoint developer; News corporation sells MySpace](/img/86/abeb82927803712a98d2018421c3a7.png)
[today in history] June 29: SGI and MIPS merged; Microsoft acquires PowerPoint developer; News corporation sells MySpace

「运维有小邓」Active Directory 密码过期通知功能

阿里云发布《中国机器人产业图谱(2022)》,122页pdf

PostgreSQL每周新闻—6月22日

leetcode:370. Interval addition

THREEJS基础入门

STM32最小系统搭建(原理图)
随机推荐
String字符串的存储原理
CORDIC based Signal Processor desgn
The foundation and application of quantum machine learning: a concise literature review
verilog实现DDS波形发生器模块,可实现频率、相位可调,三种波形
习近平在湖北武汉考察时强调 把科技的命脉牢牢掌握在自己手中 不断提升我国发展独立性自主性安全性
GoAhead 翻译—Active Server Pages
How do I audit Active Directory User account changes?
STM32最小系统搭建(原理图)
推荐书籍--白夜行
输入年份与月份,求该月共有多少天
知识蒸馏(Knowledge Distilling)学习笔记
如何审核 Active Directory 用户账户更改?
flutter BottomNavigationBar切换页面保持状态
Practical guide to GStreamer application development (V)
Application of VoIP push in overseas audio and video services
[today in history] June 29: SGI and MIPS merged; Microsoft acquires PowerPoint developer; News corporation sells MySpace
一颗新的北极星已经升起!
GoAhead WebServer移植
Jupyter service installation and startup
Enter the year and month to find the total number of days in the month