Deprecated: parse_url(): Passing null to parameter #1 ($url) of type string is deprecated in /www/wwwroot/blog_qqvbc_com/usr/plugins/Access/Access_Core.php on line 339

Deprecated: parse_url(): Passing null to parameter #1 ($url) of type string is deprecated in /www/wwwroot/blog_qqvbc_com/usr/plugins/Access/Access_Core.php on line 392

Deprecated: parse_url(): Passing null to parameter #1 ($url) of type string is deprecated in /www/wwwroot/blog_qqvbc_com/usr/plugins/Access/Access_Core.php on line 394
php+nginx上传图片请求返回413或502错误怎么排查 - Joyber 的博客

在上传文件的时候,可能会超时而返回413、502等错误状态

返回413:内容太长了 nginx配置
检查nginx配置是否配置了 client_max_body_size 值 ,如没有配置的话默认是1m;在nginx中设置此配置项即可:
https://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size

Syntax:    client_max_body_size size;
Default:    
client_max_body_size 1m;
Context:    http, server, location

返回502,PHP执行超时
可能是由于处理超时了,检查php.ini, php-fpm.ini配置
https://www.php.net/manual/zh/info.configuration.php#ini.max-execution-time

php-fpm: request_terminate_timeout
php.ini: max_execution_time   默认30秒

标签: none

添加新评论