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

跑到curl_exec容器就好像挂掉是什么原因呢? #363

Closed
tlerbao opened this issue Feb 20, 2021 · 2 comments
Closed

跑到curl_exec容器就好像挂掉是什么原因呢? #363

tlerbao opened this issue Feb 20, 2021 · 2 comments

Comments

@tlerbao
Copy link

tlerbao commented Feb 20, 2021

一个项目只要执行到 curl_exec 就会死掉,这个 php 容器里的网站直接无法访问了转圈圈,要重启这个容器才行;代码如下:
image

我看有个 Issues #91 不知道是不是我这个问题,我按照这个配置了以后nginx容器启动不起来 自己无线重启。这里面的project.com不知道是指什么?

@tlerbao
Copy link
Author

tlerbao commented Feb 20, 2021

经过一晚上的测试,发现原因似乎还有可能是目录或文件权限的问题,看下面注释说明,搞了一下午加一晚上了,希望能帮忙解答,如果还不定,mac下的docker之旅可能就要放弃了,换回homestead开发了哈哈。

$ossClient = new OssClient($config['accessKeyId'], $config['accessKeySecret'], $config['endpoint']);
// 这里的第三个参数如果我写死,写成我在容器/tmp目录手动创建的文件 如/tmp/test 代码就炮通了
// 但是第三个参数如果写成下面这样 也就是$file['tmp_name'] 这个$file = $_FILES["file"],从表单选择的文件就会卡死
$res = $ossClient->uploadFile($config['bucket'], $ossFileName, $file['tmp_name']);

@tlerbao
Copy link
Author

tlerbao commented Feb 21, 2021

容器日志

[20-Feb-2021 20:05:32] WARNING: [pool www] child 9, script '/www/ShengXin/CRM/index.php' (request: "POST /index.php") executing too slow (3.063820 sec), logging
[20-Feb-2021 20:05:32] NOTICE: child 9 stopped for tracing
[20-Feb-2021 20:05:32] NOTICE: about to trace 9
[20-Feb-2021 20:05:32] ERROR: pread() failed: I/O error (5)
[20-Feb-2021 20:05:32] NOTICE: finished trace of 9

@tlerbao tlerbao closed this as completed Feb 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant