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

Fatal error: Uncaught exception 'Yar_Client_Transport_Exception' with message 'curl exec failed 'Timeout was reached' #15

Closed
cuimuxi opened this Issue Dec 7, 2013 · 3 comments

Comments

Projects
None yet
3 participants
@cuimuxi

cuimuxi commented Dec 7, 2013

1、yar使用的是仓库中直接clone中的版本
2、curl使用mac 平台中brew 安装了 7.33.0
3、编译的时候指定了新curl的安装目录
4、phpinfo中显示的版本好也是7.33.0
5、我在Php.ini中已经配置了yar.timeout=30
6、yar.debug=1也只能看到两条debug 消息

@laruence

This comment has been minimized.

Show comment
Hide comment
@laruence

laruence Dec 8, 2013

Owner

Mac下的libcurl不知道有什么特别的地方, 奇怪了....
等我回头仔细重现下... 找找原因.

Owner

laruence commented Dec 8, 2013

Mac下的libcurl不知道有什么特别的地方, 奇怪了....
等我回头仔细重现下... 找找原因.

@laruence

This comment has been minimized.

Show comment
Hide comment
@laruence

laruence Dec 8, 2013

Owner

貌似还是因为Mac自带的libcurl有一些特殊实现.. 这里是解决的办法

你的这个问题, 估计是你编译php的时候, 还是使用了系统的libcurl.

1. 安装新版的curl, brew install curl

2. 重新编译你的PHP, --with-curl=brew_curl

3. 然后编译yar.

或者你也可以:

export DYLD_LIBRARY_PATH=/usr/local/Cellar/curl/7.33.0/lib:$DYLD_LIBRARY_PATH

thanks

Owner

laruence commented Dec 8, 2013

貌似还是因为Mac自带的libcurl有一些特殊实现.. 这里是解决的办法

你的这个问题, 估计是你编译php的时候, 还是使用了系统的libcurl.

1. 安装新版的curl, brew install curl

2. 重新编译你的PHP, --with-curl=brew_curl

3. 然后编译yar.

或者你也可以:

export DYLD_LIBRARY_PATH=/usr/local/Cellar/curl/7.33.0/lib:$DYLD_LIBRARY_PATH

thanks

@harryyyt

This comment has been minimized.

Show comment
Hide comment
@harryyyt

harryyyt Dec 22, 2013

在类unix系统上,curl存在一个bug,就是当超时时间小于1000ms时会立即超时,提示Timeout was reached,一个简单的解决方法就是设置yar超时时间大于1000,详细描述见:http://www.php.net/manual/zh/function.curl-setopt.php#104597

harryyyt commented Dec 22, 2013

在类unix系统上,curl存在一个bug,就是当超时时间小于1000ms时会立即超时,提示Timeout was reached,一个简单的解决方法就是设置yar超时时间大于1000,详细描述见:http://www.php.net/manual/zh/function.curl-setopt.php#104597

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment