Hi, any one having issues with uploading multiple pictures? .. I create the Album ( fine ) i select images 10+ ( 10 or under work fine! ) then press add, it briefely appears to upload them, then just goes grey and fails!.. I have already checked all limits, in studio.. albums, una files, and php.ini and php settings in server.. nothing works you cant upload more than 10 at a time..
- 124
Comments
Hello @atcbook!
Could you please provide us the screenshots from your UNA studio->Dashboard->Server audit area and the summary size of your uploading images?
A
PHP:
MySQL:
Web-server: nginx/1.28.0
A
Site optimization
PHP:
MySQL:
A
UNA:
It’s very likely that the issue is related to your server’s available memory and the PHP/Nginx configuration limits. Processing time may vary depending on the operation and the number of available CPU cores, taking more or less time accordingly.
Both have their own memory, upload size, and timeout restrictions, and when uploading large images or multiple files at once, these limits can easily be reached.
⚙️ PHP Configuration
Open your
php.inifile and increase the following values according to your server’s available resources:After making these changes, restart PHP-FPM:
🌐 Nginx Configuration
In your Nginx site configuration file (usually
/etc/nginx/sites-available/your-site.conf), increase both the upload limit and timeout values to handle large uploads:Then reload Nginx:
These settings ensure that Nginx allows large files and doesn’t interrupt long uploads or slow connections.
🧠 Checking Server Memory
To make sure your server has enough free memory for these operations, you can check it directly from the command line:
1. View total and available memory:
Example output:
The “available” column shows how much memory can still be safely used.
2. Monitor memory in real time:
or
topIn htop, press
Mto sort processes by memory usage.3. Get a detailed overview (optional):
This shows memory, CPU, swap, and network usage in real time.
🧩 Additional Recommendations
💡 Tip:
Before adjusting any configuration, always check how much available memory your server has using
free -h.Try to allocate around 50–60% of the available memory to PHP, leaving the rest for the operating system and other services.
Increasing PHP and Nginx limits often solves upload issues, but it’s equally important to ensure that your server has enough free RAM to support these settings.
You can use my script to reinstall PHP, but it only supports versions up to 8.3: https://github.com/kabballa/PHP-UNA
A
thank you for your reply, however as i stated in the post above. I have changed all those values etc and it made no difference. it still wont upload more than 10. pictures at a time..
Well, your parameters look OK, so perhaps it might be some inner hosting limits. From my side, I could upload 11 images into album:
Before the submit:and after:
Is this a dedicated server or a VPS? What is the available memory and what processors does your server have?
It is possible that your PHP is not configured correctly. Run my script and you will see that it works properly the installation completes in less than 1 minute. My script is designed to install PHP on the fly.
For handling more processes, you will need additional PHP child servers a standard setup is not enough for a large volume of files. You can check my configuration and see how the PHP child processes should be set up here: https://github.com/kabballa/PHP-UNA/blob/dev/php.sh
⚠️ If your server does not have enough resources, it is possible that it will not work properly.
PHP 8.3 works perfectly with this script. If you don’t want to reinstall, I plan to update it soon to support PHP 8.4, but I don’t have time to do that right now. You can also configure PHP 8.4 manually if you carefully follow the steps in my script.
if you change the php version you must also change the nginx config
aslo setup
# Maximum number of open files for PHP-FPM.
RLIMIT_FILES=65536
# Maximum size of core files created by PHP-FPM.
RLIMIT_CORE=0
These settings affect system-level limits, not just PHP-FPM, so you need to make sure your server allows them:
RLIMIT_FILES=65536– sets the maximum number of files that PHP-FPM can open simultaneously.ulimitor configuration files (/etc/security/limits.confor/etc/systemd/system/php*.service.d/override.confif using systemd).8.3with your PHP version)RLIMIT_CORE=0– limits the size of core dump files.0means core dumps are disabled.ulimitor other OS-level settings.Changing only the
www.conffile is not enough if the OS imposes stricter limits. You must ensure the system allows the values you set for PHP-FPM.⚠️ Make sure you restart the PHP-FPM and Nginx services after modifying any PHP or FPM configuration to apply changes properly.
more nginx setup:
########################################################################### ## Client Timeout Settings ########################################################################### client_max_body_size 4096M; # Timeout for receiving request body from the client client_body_timeout 300; # Timeout for receiving request headers from the client client_header_timeout 300; # Keep connection alive for reuse keepalive_timeout 300; # Timeout for transmitting response to the client send_timeout 300; # Reset lingering timed-out connections (helps prevent DDoS) reset_timedout_connection on; ########################################################################### ## Proxy Timeout Settings ########################################################################### proxy_connect_timeout 300; proxy_send_timeout 300; proxy_read_timeout 300; ########################################################################### ## PHP-FPM Settings ########################################################################### location ~ \.php$ { # Use PHP-FPM Unix socket instead of TCP port fastcgi_pass unix:/run/php/php8.4-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; # Timeouts fastcgi_connect_timeout 300; fastcgi_send_timeout 300; fastcgi_read_timeout 300; # Buffers fastcgi_buffer_size 128k; fastcgi_buffers 8 256k; fastcgi_busy_buffers_size 512k; fastcgi_temp_file_write_size 512k; # Improve performance for large uploads or scripts fastcgi_request_buffering off; }