Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

系统偶发报connect() to unix:/dev/shm/live-server.sock failed #447

Open
junthink opened this issue May 22, 2023 · 6 comments
Open

系统偶发报connect() to unix:/dev/shm/live-server.sock failed #447

junthink opened this issue May 22, 2023 · 6 comments
Assignees
Labels
analyzing Analyzing this issue

Comments

@junthink
Copy link

  1. Your software version (Screenshot of your startup)

    Software Version
    PHP 8.1.2
    Swoole 5.0.1
    Laravel/Lumen 3.7.35
  2. Detail description about this issue(error/log)

    2023/05/22 18:10:12 [crit] 1607#1607: *1057 connect() to unix:/dev/shm/live-server.sock failed (2: No such file or director y) while connecting to upstream, client: 100.122.17.74, server: xxxxxx.com, request: "POST /user/heartbeat?_did=4329 206970223442688&_uid=559266&c=ishow&l=id&m=google&ms=1684750212916&p=android&v=1.2.20230512 HTTP/1.1", upstream: "http://un ix:/dev/shm/live-server.sock:/user/heartbeat?_did=4329206970223442688&_uid=559266&c=ishow&l=id&m=google&ms=1684750212916&p= android&v=1.2.20230512", host: "xxxxxx.com"

  3. Some reproducible code blocks and steps
    我们是用pm2 启动的laravels,系统会在某个瞬间,大概几秒内大量报上面的错误,请问大佬和各位弟兄遇到过类似的情况吗?

@junthink junthink added the analyzing Analyzing this issue label May 22, 2023
@hhxsv5
Copy link
Owner

hhxsv5 commented May 22, 2023

unix:/dev/shm/live-server.sock 这个unix socket是干什么的?

@junthink
Copy link
Author

upstream live-api { server unix:/dev/shm/live-server.sock weight=5 max_fails=3 fail_timeout=3s; keepalive 16; }
通过 UnixSocket Stream 连接提供接口请求的服务

@deepsea-tyy
Copy link

我也遇到同样的问题,php7.4 swoole4.8

@deepsea-tyy
Copy link

@junthink 解决没有

@junthink
Copy link
Author

@junthink 解决没有

没有,太难受了,毫无征兆,主要是没有规律,有时候服务器也没啥负载,突然几秒钟内大量出现,然后就恢复了,我们和官方推荐的方案唯一不一样的是我们用的是pm2管理的进程

@junthink
Copy link
Author

junthink commented Sep 1, 2023

@deepsea-tyy 我的问题解决了,原因是我们多台服务器使用的项目目录是通过NAS挂载的目录,所以laravels.pid文件也是同一个,导致其中一台机器有服务自动重启的时候导致所有服务器的服务都会重启

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzing Analyzing this issue
Projects
None yet
Development

No branches or pull requests

3 participants