Multiple Photo Uploads - Site slows to unusable
When a user chooses to upload multiple photos, either in Albums or in a Post, it slows our server to a crawl, and no other users can do anything on the site until their upload is complete.
Is there a way to set any settings that will either limit the number of simultaneous uploads, have the script do them one at a time, or somehow allocate fewer resources to the uploading user so that the site will continue to run?
Or is my only option a faster server?
-
-
- · PavelS
- ·
Hello, it maybe your server doesn't have enought php processes to handle such number of images, if you have php-fpm try to check if pm.max_children is high enough in you php fpm configuration.
-
- · Brian
-
·
In reply to LeonidS
- ·
What is the recommended memory limit setting?
the "Use GD Library" box is checked.
-
- · Brian
-
·
In reply to PavelS
- ·
I'll look at that.
-
- · PavelS
-
·
In reply to Brian
- ·
I think there is no recommended amount of memory, the more users and photos, the more memory the server needs to process requests.. If you have little memory, you should receive an email that looks something like this:
PHP Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 668995584 bytes) in /home/domains/bbbbbbbb.com/web/public/inc/utils.inc.php on line 1138
-
- · Brian
- ·
I've got the memory set to 4gb. That should be plenty. I'm not familiar with php-fpm. Not sure where to start with that.
-
- · PavelS
-
·
In reply to Brian
- ·
I have a memory_limit of 5.9 GB, and if you're not sure how to configure php-fpm, ask the server administrator to increase the number of subprocesses in the PHP settings."
-
- · Brian
-
·
In reply to PavelS
- ·
haha... I'm the server admin. and I have no idea. Something I have to learn. Any tips?
-
- · PavelS
-
·
In reply to Brian
- ·
/etc/php/7.x/fpm/pool.d/www.conf (7.x changes to your PHP version)
for exampl:
pm = dynamic
pm.max_children = 50
pm.start_servers = 10
pm.min_spare_servers = 5
pm.max_spare_servers = 20
-
- · PavelS
- ·
If you use a universal interface for server management, you have to search in the PHP settings
-
- · Brian
-
·
In reply to PavelS
- ·
thank you