In Craft 3, I keep running into an issue when I try to move a large amount of files (around 200) by dragging and dropping from my “Holding” folder into a “Live” folder using Craft Assets section. Both folders are hosted on Amazon S3. Even moving three files seems to take a really long time (about a minute).
After checking the server logs it looks like I am filling my max apache connection due to the search-index-perform-action. The error suggested I increase my “MaxRequestWorkers” setting.
I move about 2,000 files every month and never had a problem on Craft 2. I don’t know if should change the “MaxRequestWorkers” setting or if there is something else I should consider doing. If I should change the setting, where is it, I can't seem to find it.
I use Transmit FTP to initially move the files into the Holding folder and then index the assets in that folder. Then in Craft CMS control panel, I drag the files from Holding folder to the main Live folder so that the asset index gets updated.
I looked in my
phperror.log file and found these three types of errors occuring:
PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 1048576 bytes) in /storage/avxxxxx/www/public_html/vendor/craftcms/cms/src/helpers/DateTimeHelper.php on line 231 PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 20480 bytes) in /storage/avxxxxx/www/public_html/vendor/craftcms/cms/src/elements/db/ElementQuery.php on line 2215 PHP Fatal error: Maximum execution time of 90 seconds exceeded in /storage/avxxxxx/www/public_html/vendor/league/flysystem/src/Util.php on line 322 PHP Fatal error: Maximum execution time of 90 seconds exceeded in /storage/avxxxxx/www/public_html/vendor/league/flysystem-aws-s3-v3/src/AwsS3Adapter.php on line 294 PHP Fatal error: Maximum execution time of 90 seconds exceeded in /storage/avxxxxx/www/public_html/vendor/league/flysystem/src/Util/ContentListingFormatter.php on line 52
It seems like when I move a file from Holding (950 files) to Live (20,000) files is where things get hung up.
- Holding -> Live = 1 file takes 7 seconds to move
- Live -> Holding = 1 file takes 20 seconds to move
Could it be an issue with the cache or search-index?
Here are my current settings if it helps:
memory_limit 256M max_execution_time = 90 Max Requests = Per Child: 300 - Keep Alive: on - Max Per Connection: 150 Timeouts = Connection: 10 - Keep-Alive: 2