之前时不时会收到 Google Search Console 发来的邮件告知在索引页面的时候遇到了5xx,一直都没有管。 直到上周我自己重现了一次才开始重视起来。 Search Console has identified that your site is affected by 1 Page indexing issue(s). The following issues were found on your site.
Top Issues
Server error (5xx)
We recommend that you fix these issues when possible to enable the best experience and coverage in Google Search.
检查日志发现如下内容:
2023/12/12 01:23:45 [error] 2175086#0: *57111 connect() to unix:/run/php-fpm/www.sock failed (11: Resource temporarily unavailable) while connecting to upstream, client: 192.3.114.12, server: example.com, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm/www.sock:", host: "example.com", referrer: "http://example.com/"
The default token TTL for Kubernetes Dashboard is 10 minutes, it is inconvenient in a development environment. We can remove this limit by disabling the TTL or enabling the skip login.
1. Inspect the configuration for kubernetes-dashboard
kubectl -n kubernetes-dashboard describe deployments kubernetes-dashboard
You may see --auto-generate-certificates in the **arg** section.
2. Update the configuration to add --token-ttl=0 to disable the session timeout; add -enable-skip-login to enable the skip login button.
kubectl -n kubernetes-dashboard edit deployments kubernetes-dashboard
The following command can be used to create a SSH Tunneling which forwards any connection to port 1234 on the local machine to port 4321 on localhost via example.com
ssh -N -L 1234:localhost:4321 -p 22 -i ~/.ssh/id_rsa [email protected]