Giter Site home page Giter Site logo

Comments (7)

peinhu avatar peinhu commented on June 6, 2024

之前没人报过这个错误,linux测试是没问题的,我上传过4g的文件。
你这个情况比较诡异,不是在开始时报错,也不是在结束时报错,是中途报错,这阶段一般是不会报错的,估计是不是你服务器改了什么配置造成的?目前我无法复现你的情况,所以不太好排查。用一台新服务器安装全新的laravel和扩展包测试一下,如果还有这错误,才能归因于代码的问题。

from aetherupload-laravel.

peinhu avatar peinhu commented on June 6, 2024

windows环境测试正常,其实已经可以证明代码没问题了,我估计还是你哪里修改了配置的原因。

from aetherupload-laravel.

peinhu avatar peinhu commented on June 6, 2024

有一种可能是你是在本地上传,上传速度非常快,但服务器的内存又比较小,而linux的机制会在频繁读写磁盘的时候自动在内存中替你缓存文件,导致你最后内存被完全占满,所以写入失败,这个是我的猜测。

from aetherupload-laravel.

peinhu avatar peinhu commented on June 6, 2024

根据上面的猜测,可以尝试把上传的分块大小加大,以此来减少文件读写频率,如果用的是nignx的话,具体是将nginx.conf中的client_max_body_size设置为4m,将php.ini中的post_max_size设置为5M、upload_max_filesize设置为4M,然后重启php-fpm和nginx服务,最后将aetherupload.php中的chunk_size设置为4000000。

from aetherupload-laravel.

phpervip avatar phpervip commented on June 6, 2024

我也遇到上传失败的问题了,
哈希100%
错误:上传失败
POST http://域名/aetherupload/preprocess 502 (Bad Gateway)
即使是很小只2k的文件也会。

from aetherupload-laravel.

peinhu avatar peinhu commented on June 6, 2024

@phpervip
你这情况应该跟他不一样,是开始上传时候就出错,检查一下上传目录storage/app以及子文件夹的目录权限是否是755,另外,laravel版本号提供一下?新出的版本是可能有不兼容改动的,我在本地测试下。

from aetherupload-laravel.

Umbrella-J avatar Umbrella-J commented on June 6, 2024

@peinhu 感谢回复,确实不是程序的问题,是我们自己机器上有另外的进程影响了上传。

from aetherupload-laravel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.