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?
Comments
Hello @Brian !
First, check the possibility to increase the memory_limit PHP parameter. Also, you may try to switch the image library in the Developer App (the "Use GD library for image processing" option).
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.
What is the recommended memory limit setting?
the "Use GD Library" box is checked.
I'll look at that.
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
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.
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."
haha... I'm the server admin. and I have no idea. Something I have to learn. Any tips?
/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
If you use a universal interface for server management, you have to search in the PHP settings
thank you