9月 19, 2023 - IT, 其他    数据库跨境问题已关闭评论

数据库跨境问题

场景:欧洲的服务器想要链接亚东服务器的mysql或者redis,这种情况就会出现网络跨境问题,造成的现象是,公网链接速度延迟较大,造成mysql或redis许多链接超时的问题.

Illuminate\Database\Eloquent\ModelNotFoundException: No query results for model [App\Models\User]. in /var/www/html/staging/cpulse-be-staging.ivideocloud.cn/releases/20230706082228/vendor/laravel/framework/sr[……]

Read more

9月 1, 2023 - Linux, php开发    php使用ssh2通过账密连接服务器失败已关闭评论

php使用ssh2通过账密连接服务器失败

问题描述:

php直接通过ssh2拓展链接服务器,结果发生了catch

//建立ssh2连接
$ssh2 = ssh2_connect($public_ip, 22);
if (!$ssh2) {
    Log::error('连接服务器失败');
    //重新建立ssh2连接
    sleep(10);
    $ssh2 = ssh2_connect($public_ip, 22);
    if (!$ssh2) {
        Log::error('再次连接服务器失败');

        return;
    }
}
Log::in[......]

Read more

8月 31, 2023 - Linux, php开发    nginx请求报错504–upstream timed out (110: Connection timed out) while reading response header from upstream已关闭评论

nginx请求报错504–upstream timed out (110: Connection timed out) while reading response header from upstream

批量下载视频链接,开始用的是GET请求的方式,发现当选择的视频过多,当超过1600视频时,会因为参数过大导致报错.一般get参数的长度支持2k.
解决办法:
换成POST的形式,但是会出现超时的问题:如下
upstream timed out (110: Connection timed out) while reading response header from upstream, client: 121.xx.103.xxx, server: mpace.ivideoforce.com, request: “POST /api/v1/org/1/cp/75/video/bulk/e[……]

Read more

页面:«1...78910111213...44»