Ryan M Posted September 6, 2022 Posted September 6, 2022 (edited) So I recently tried changing my downloads file storage from the local server to S3. I set up a cron and even tried running the maintenance tasks manually, but nothing is moving over. I can't stop the change because it says no changes can be made while a move is in process (there should be a cancel option) . At first I got an error about the PHP upload size limit, which was 2M (I updated this to 16M), but now I am getting this error when I try to manually run the tasks: Fatal error: Allowed memory size of 2147483648 bytes exhausted (tried to allocate 1077367400 bytes) in /var/www/vhosts/swrebellion.net/httpdocs/system/Http/Request/Sockets.php on line 247 There has got to be a way to abort this process and remove the S3 storage option altogether. Edited September 6, 2022 by Ryan M
Marc Posted September 6, 2022 Posted September 6, 2022 You have the same issue there. You are running out of memory. You would need to up your memory limit again in order to ensure there is enough for moving large files across. There is no cancel option, as this has already been started, and even if that button were to exist, it would actually have to start a move process itself (to move the items its already moved back)
balazsp Posted September 6, 2022 Posted September 6, 2022 @Marc Stridgen imo it tried to allocate 2+1GB here. very few servers allow that much ram for PHP. does the whole file need to be in memory for the upload? @Ryan M how many GBs are you trying to move to S3?
Ryan M Posted September 6, 2022 Author Posted September 6, 2022 38 minutes ago, Marc Stridgen said: You have the same issue there. You are running out of memory. You would need to up your memory limit again in order to ensure there is enough for moving large files across. There is no cancel option, as this has already been started, and even if that button were to exist, it would actually have to start a move process itself (to move the items its already moved back) So server options in the control panel don't allow me more than 16M for the upload_max_filesize but I manually edited php.ini so I think it is set for 100M now. So I started the manual run again and it just spins looking like this. We'll see what happens. My largest file is just under 90M 29 minutes ago, balazsp said: @Ryan M how many GBs are you trying to move to S3? At the moment less than 200M
Marc Posted September 6, 2022 Posted September 6, 2022 The problem is that you are changing the wrong value. Its memory_limit that you need to be increasing
Ryan M Posted September 6, 2022 Author Posted September 6, 2022 Current memory limit is 128M. My largest file it should be trying to transfer is only 85MB. There are only 7 files of this type listed in the admin center, and the rest of them are under 2MB. I had the "run tasks manually" page up attempting to run for the last 4 hours and according to the dashboard, progress meters for everything are at 0. This will basically be a showstopper if none of the background tasks ever can run.,. What I also wonder about is why the background process manual run page gets stuck on "Starting ..." with a spinning "thinking" circle. If I recall correctly, it usually would have numbers like X processes of (total) completed and would frequently refresh that number. I can't even check the settings of the S3 storage to see if I notice anything wrong since it won't let me view it while it is attempting to move files, though I think I would have seen an error of some kind if it weren't connectiving at all.
Marc Posted September 6, 2022 Posted September 6, 2022 Sorry, Im a little confused here. You had checked your error logs and it states there that you are out of memory, which is what is causing you the issue. This would not necessarily correlate to file size. If you havent upped the memory limit since you were trying this last, then nothing will change. You need to temporarily significantly increase your memory limit setting.
Ryan M Posted September 6, 2022 Author Posted September 6, 2022 (edited) I did up the limit to 256M with no difference in results. Is there a specific higher limit I should try? I also want to mention this is a dedicated server, not a VPS or shared host. Edited September 6, 2022 by Ryan M
Marc Posted September 6, 2022 Posted September 6, 2022 As you stated this was the error, it was trying to allocate over 2G Fatal error: Allowed memory size of 2147483648 bytes exhausted (tried to allocate 1077367400 bytes)
Ryan M Posted September 7, 2022 Author Posted September 7, 2022 Ah yes, sorry about that. So I upped the memory limit to 2G and then to 4G and I am still seeing similar or same errors. I verified the config with phpinfo. Since no files have moved, is there a way I can delete the move task somewhere in the db or a config file and then delete the S3 endpoint? There has got to be a way to stop it, otherwise all tasks won't run and be stuck because its holding it up, making the backend functions of the community stop working. Any chance of you guys connecting to take a look?
Marc Posted September 7, 2022 Posted September 7, 2022 Sorry, could I clarify here, its not yet moved anything at all to your s3 bucket?
Ryan M Posted September 7, 2022 Author Posted September 7, 2022 (edited) Edit: I checked the bucket - I am seeing some things in there - not sure if it has anything else to move though, I only chose "File Downloads" category. Edited September 7, 2022 by Ryan M
Marc Posted September 7, 2022 Posted September 7, 2022 I have tagged our developers to see if there is anything else we can suggest here
Marc Posted September 16, 2022 Posted September 16, 2022 I have created a new ticket on this for you so we can take a closer look
Recommended Posts