简体   繁体   English

增加LAMP服务器上的最大并发文件上传数

[英]Increasing the max concurrent file uploads on a LAMP server

I have an issue where my client wants to be able to upload more than 2 large files at a time, and i was wondering if any of you have a solution to this, i'm pretty sure that it is a setting in either Apache or PHP. 我遇到一个问题,我的客户希望一次可以上传两个以上的大文件,我想知道你们中是否有人对此有解决方案,我很确定这是Apache还是PHP。

Here is what the scenario, i have an upload form for videos with a max file size of 1024MB (1GB), so when a user uploads 1 file that is less than or equal to 1GB it works fine, then they open a new tab and upload another large file, but when they open up a 3rd tab of that form and try to Upload i Get a IO error from the form, so i assume either PHP or apache is limiting the max number of concurrent uploads to the server. 在这种情况下,我有一个视频上传文件,最大文件大小为1024MB(1GB),因此,当用户上传1个小于或等于1GB的文件时,它可以正常工作,然后他们打开一个新标签页,上传另一个大文件,但是当他们打开该表单的第三个选项卡并尝试上传时,我从表单中获取IO错误,因此我认为PHP或apache限制了并发上传到服务器的最大数量。

Edit: 编辑:

When i use another computer with a totally separate internet connection (separate/different external IP) i can upload there as well, so it seems like a max concurrent upload per client/IP. 当我使用完全独立的Internet连接(独立的/不同的外部IP)的另一台计算机时,我也可以上传到那里,因此似乎每个客户端/ IP的最大同时上传数量。

I think increasing the memory assigned to a php script can help you, I don't think this is the most appropriate solution but when i was having problem handling lot of big files, I increased the memory for the script. 我认为增加分配给php脚本的内存可以为您提供帮助,我认为这不是最合适的解决方案,但是当我在处理大量大文件时遇到问题时,我增加了该脚本的内存。 If you are developing this for a very busy site i don't recommend this method but as far as i know try increasing the memory. 如果您正在为非常繁忙的站点开发此程序,我不建议您使用此方法,但据我所知,请尝试增加内存。

     ini_set('memory_limit','128M');

for testing if you have -1 instead of 128M the system will give unlimited memory to the script. 如果您使用-1而不是128M进行测试,系统将为脚本提供无限的内存。 You can use this to test if the problem is caused due to memory. 您可以使用它来测试问题是否是由于内存引起的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM